ComboBox.Items.Insert(int index, object obj) - > whats the object?
-
Hi, Im using compact framework on VS 2005, Im binding a combobox alright, but I want to insert a new item at zero index, like on windows I used to:
ComoBox1.Items.Insert(0,new ListItem("0","Select"));
but there is noListItem
in compact framework. I am not able to insert that new item at an index, when I do a Combobox.Items.Insert(..... Vs gives me (int index,object obj). How do I insert that 0 index in compact framework??? please help._____________________________________________________ Yea! I could be wrong...
-
Hi, Im using compact framework on VS 2005, Im binding a combobox alright, but I want to insert a new item at zero index, like on windows I used to:
ComoBox1.Items.Insert(0,new ListItem("0","Select"));
but there is noListItem
in compact framework. I am not able to insert that new item at an index, when I do a Combobox.Items.Insert(..... Vs gives me (int index,object obj). How do I insert that 0 index in compact framework??? please help._____________________________________________________ Yea! I could be wrong...
Hi saud_a_k, Object means it may be any thing like string,int,char,class........ If u want insert an string at o index in combobox just use insert method: combobox1.Items.Insert(0,"Select") Use this it will works Nagaraju
-
Hi saud_a_k, Object means it may be any thing like string,int,char,class........ If u want insert an string at o index in combobox just use insert method: combobox1.Items.Insert(0,"Select") Use this it will works Nagaraju
DataSet ds = new DataSet();
ds = getDataSet;
if (ds.Tables[0].Rows.Count > 0)
{
c.ValueMember = "cpt_icd_mapping";
c.DisplayMember = "icd_code";
c.DataSource = ds.Tables[0].DefaultView;
c.Items.Insert(0,"ICD"); // IT CAUSES ERROR HERE! value does not fall within //expected range
}I did as I usually do in windows but it gave me the error: value does not fall within the expected range
_____________________________________________________ Yea! I could be wrong...