Difference between grid binding and ComboBox BindingDifference between grid binding and ComboBox Binding
Old forum URL: forums.lhotka.net/forums/t/233.aspx
Tim FOrd posted on Wednesday, May 31, 2006
Hi i don't know if i'm missing something but i have created a class based on NameValueListBase called lookups, when i do a getlist it return the Lookups items and i can assign this to a grid using the datasource but for some reason it does not work when assigning it to a ComboBox.
Dim objLookups As BusinessObjects.Lookups = BusinessObjects.Lookups.GetList
ComboBox1.DataSource = objLookups
DataGridView1.DataSource = objLookups
Do i need to use the DisplayMemeber because i'm unsure what property etc to assign to the DisplayMemeber.
Any help would be greatly appreciated.(Pretty new to this)
Thanks, Tim.
xal replied on Wednesday, May 31, 2006
Tim,
Use these values:
ValueMember="Key"
DisplayMember="Value"
Andrés
Tim FOrd replied on Thursday, June 01, 2006
Hi xal,
I knew it would be simple.
Thanks, Tim.
JugerHiTech replied on Thursday, March 25, 2010
Hi,
Is there some method to get the value in the format of [NameValueListBase<string, string>.NameValuePair] from the datagridview's combobox column ?
Edwin
Copyright (c) Marimer LLC