Home Forums WinForms controls Xceed Grid for WinForms Regarding comboboxeditor Reply To: Regarding comboboxeditor

User (Old forums)
Member
Post count: 23064

Department3 is a table eventhough iam not filling the data it showing that exception.please take a look this entire code.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim strselect As String

strselect =

“select * from synemployees”

Dim ds As New DataSet

Dim dap As New SqlDataAdapter(strselect, con)

dap.Fill(ds,

“synemployees”)

GridControl1.SetDataBinding(ds,

“synemployees”)

 

Dim simplecomboboxeditor As New Editors.ComboBoxEditor(ds, “Department3”, “Departmentid”, “%Departmentname%”)

simplecomboboxeditor.TemplateControl.BorderStyle = EnhancedBorderStyle.Fixed3D

SetWinComboBoxStyle(simplecomboboxeditor.TemplateControl)

simplecomboboxeditor.TemplateControl.DropDownSize =

New Size(150, 150)

GridControl1.Columns(

“Departmentid”).CellEditorManager = simplecomboboxeditor

Dim simplecomboboxviewer As New Viewers.ComboBoxViewer(ds, “Department3”, “Departmentid”, “%Departmentname%”)

GridControl1.Columns(

“Departmentid”).CellViewerManager = New Viewers.ComboBoxViewer

End Sub

Imported from legacy forums. Posted by yeswanth (had 2486 views)