I have one combobox. Combobox Datasource is object NameValueList.
My code: combobox.DataSource = objNameValueList;
When event combobox_DropDownClosed raise, i want to get ValueMember of Combobox but i can't.
And combobox.SelectedItem has Key (1) and Value ("Jack"). I want to get key (1). I can't do it.
Please.
Can you get the value with
dim cbKey as integer
cbKey = combobox.SelectedValue
I dont think so. it dont do that.
???
What tech are you using? ASP.NET? WPF? Winforms? Silverlight?
Try casting your combobox.SeletedItem to a NameValuePair and retrieve it from that.
((Csla.NameValueListBase<string, string>.NameValuePair)myCombo.SelectedItem).Key
Thanks so much!
You are Pro.
I can do it.
Try casting your combobox.SeletedItem to a NameValuePair and retrieve it from that.
((Csla.NameValueListBase<string, string>.NameValuePair)myCombo.SelectedItem).Key
Copyright (c) Marimer LLC