Loop through combobox items
-
hi to all, how can i loop through all the items of a combobox and get the index, value and text of each item best regards and thanks in advance fady
-
hi to all, how can i loop through all the items of a combobox and get the index, value and text of each item best regards and thanks in advance fady
Hi fady, The combobox has a property called Items. This is a collection so you could use something like this: foreach(String str in combobox.Items) { ... } Prady
-
hi to all, how can i loop through all the items of a combobox and get the index, value and text of each item best regards and thanks in advance fady
-
The combobox has an Items collection. Each item in the collection has properties for the text and value. --- b { font-weight: normal; }
thanks to your reply, i tried to use the items but i doesn't work because my combo is binded with a dataset comboBox1.DisplayMember = "LIBL"; comboBox1.ValueMember = "ID"; comboBox1.DataSource = oDs.Tables[0]; the dataset is filled through a stored procedure best regards, fady
-
thanks to your reply, i tried to use the items but i doesn't work because my combo is binded with a dataset comboBox1.DisplayMember = "LIBL"; comboBox1.ValueMember = "ID"; comboBox1.DataSource = oDs.Tables[0]; the dataset is filled through a stored procedure best regards, fady