Home Forums WinForms controls Xceed Grid for WinForms Binding values Reply To: Binding values

User (Old forums)
Member
Post count: 23064

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.html
http://doc.xceedsoft.com/products/XceedGrid/ComboBoxEditor.html
http://doc.xceedsoft.com/products/XceedGrid/Xceed.Grid~Xceed.Grid.Viewers.ComboBoxViewer~ValueMember.html
http://doc.xceedsoft.com/products/XceedGrid/Display_format.html

 

Imported from legacy forums. Posted by André (had 1816 views)