Home Forums WinForms controls Xceed Grid for WinForms quick edit options for GridComboBox/GridDateTimePicker/etc. Reply To: quick edit options for GridComboBox/GridDateTimePicker/etc.

User (Old forums)
Member
Post count: 23064

Thanks for the response. The tip about F2 worked great. Unfortunatley I can’t get the SingleClickEdit to work. With SingleClickEdit true I am able to click on a cell and instantly access the celleditor, but if I get focus with tab the only way to access the editor is via F2. My goal is to allow the user to tab into a combobox cell, start typing a value and automatically get the matching responses.

Here is my code to add the editor/viewer right now:

Note: colNames[i] just holds the database field name for the value

———–
GridComboBox comboEditor = new Xceed.Grid.Editors.GridComboBox();
this.Columns[ colNames[i]].CellEditor = comboEditor;
this.Columns[ colNames[i]].CellViewer = comboEditor;

SqlCommand comm = new SqlCommand(“Get”+colNames[i]+”List”);
//appConn.GetData will return a filled dataset containing the display/value items for the combobox
DataSet ds2 = appConn.GetData(comm, colNames[i]+”DS”, colNames[i]+”Tbl”);

comboEditor.DataSource = ds2.Tables[colNames[i]+”Tbl”];

comboEditor.DisplayMember = “DisplayValue”;

comboEditor.ValueMember = colNames[i];

Imported from legacy forums. Posted by samnet (had 396 views)