overloading .net control's property
-
Hi, i use flat file system in my vb.net project. when i load data ,say CustName to a comboBox i want to have the corresponding CustID somewhere (like selecteindices.item in Listview control) so that i can catch that Id when user select a particular CustName. 1.Is there any property available in ComboBox to store a pair values. 2. How to override a .net windows control's property that is overridable. 3. Is it possible to override comboBox.items.item property ? how ? Regards, aB
-
Hi, i use flat file system in my vb.net project. when i load data ,say CustName to a comboBox i want to have the corresponding CustID somewhere (like selecteindices.item in Listview control) so that i can catch that Id when user select a particular CustName. 1.Is there any property available in ComboBox to store a pair values. 2. How to override a .net windows control's property that is overridable. 3. Is it possible to override comboBox.items.item property ? how ? Regards, aB
baste wrote: Is there any property available in ComboBox to store a pair values. Yes, a combobox can store any value you like. Just set the DisplayMember property to be a property on the class you're adding, so that it knows where to look for the string to display. baste wrote: How to override a .net windows control's property that is overridable. Derive a class from the control class, in this case, ComboBox. However, you don't need to in this case. Christian Graus - Microsoft MVP - C++