Sep 05, 2011, 9:05 AM
recuperate id item from combobox
hi,
the problem i have is concerning id of listitem, in my gridpanel, i have a combobox list wich content list of data, i have created like this :
thanks,
the problem i have is concerning id of listitem, in my gridpanel, i have a combobox list wich content list of data, i have created like this :
ComboBox cb = new ComboBox();
LoadedList<MVarietyGroup> liste = MVarietyGroup.LoadBySpecie(_planSeedNeed.ProductionPlan.Specie);
Ext.Net.ListItem listItem = new Ext.Net.ListItem();
foreach (MVarietyGroup groupe in liste)
{
//cb.Items.Add(new Ext.Net.ListItem(groupe.Id, groupe.Name)); // want to use something like this, to have the id and the name (value)
cb.Items.Add(new Ext.Net.ListItem(groupe.Name, groupe.Name));
}
i want to recuperate the item id to send it for saving, the problem is that in my "MVarietyGroup" i don't have id value, so i just want to know how can i proceed to obtain it from the listbox.thanks,