Home › Forums › WinForms controls › Xceed Grid for WinForms › Binding values
Hi,
How can we bind the values into comboboxeditor from the database after creating combobox programatically
Imported from legacy forums. Posted by yeswanth (had 1322 views)
You can do something like the following, assuming a DataSet with a “Suppliers” table :
WinComboBox comboBox = new WinComboBox( EnhancedBorderStyle.None ); comboBox.SetDataBinding( this.northwindDataSet, “Suppliers” ); comboBox.ValueMember = “SupplierID”; comboBox.DisplayFormat = “%CompanyName%”; gridControl1.Columns[ 0 ].CellEditorManager = new ComboBoxEditor( comboBox );
Here is more information from our help documentation.
http://doc.xceedsoft.com/products/XceedGrid/ComboBox_Data_binding.htmlhttp://doc.xceedsoft.com/products/XceedGrid/ComboBoxEditor.htmlhttp://doc.xceedsoft.com/products/XceedGrid/Xceed.Grid~Xceed.Grid.Viewers.ComboBoxViewer~ValueMember.htmlhttp://doc.xceedsoft.com/products/XceedGrid/Display_format.html
Imported from legacy forums. Posted by André (had 1816 views)