I am using vb.net and syncfusion grid(Syncfusion.Windows.Forms.Grid.GridControl)
I have a colunm in the grid which is a combobox.
I want to load the combo as normal .net combo with DisplayMember and ViewMember
Currentlly i am using ChoiceList property,this can hold only one value
my aim is to show customer name in the list and carry customerID at backend
ADAdministrator Syncfusion Team June 11, 2004 03:40 PM
One way to do this is to create a DataTable, yourDateTable, holding two columns, your DisplayMember property and your ValueMember property. Then in the cell where you want to see the combobox, you set the style properties like:
Dim style as GridStyleInfo = me.GridControl1(2,2)
style.DataSource = yourDataTable
style.CellType = "ComboBox"
style.DisplayMember = "displayMemberColumnName"
style.ValueMember = "valueMemberColumnName"
Here is a sample using a GridDataBoundGrid, but it should illustrate how you can set up your DataTable. Another option, instead of a DataTable, is to use an ArrayList of objects where the objects instantiate a class that you define having two public properties that are you displaymember and valuemembers. In this case you would set style.DataSource = the ArrayList.