public void initComboBox1(Dictionary<string, string>[] objs)
{
comboBox1.DataSource = null;
DataTable dt = new DataTable();
dt.Columns.Add("name");
dt.Columns.Add("id");
if (objs != null && objs.Length > 0)
{
for (int i = 0; i < objs.Length; i++)
{
string id = objs[i]["id"];
string name = objs[i]["name"];
dt.Rows.Add(new string[] { name,id});
comboBox1.ValueMember ="id";
{
comboBox1.DataSource = null;
DataTable dt = new DataTable();
dt.Columns.Add("name");
dt.Columns.Add("id");
if (objs != null && objs.Length > 0)
{
for (int i = 0; i < objs.Length; i++)
{
string id = objs[i]["id"];
string name = objs[i]["name"];
dt.Rows.Add(new string[] { name,id});
}
comboBox1.DataSource = dt.DefaultView;
comboBox1.ValueMember ="id";