We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GDBG Dropdown list values.

I''m trying to dynamically change the value of the ComboBox list on one cell in the GDBG. I''m using following code to do that: private void AssignmentGrid_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e) { GridCurrentCell currentCell = this.AssignmentGrid.CurrentCell; GridComboBoxCellRenderer cr = currentCell.Renderer as GridComboBoxCellRenderer; GridBoundColumn gridBoundColumn = this.AssignmentGrid.GridBoundColumns["FieldWorkerID"]; int colIndex = this.AssignmentGrid.GridBoundColumns.IndexOf(gridBoundColumn) + 1; if(cr != null && currentCell.ColIndex == colIndex) { cr.ListBoxPart.DataSource = UserIdList; } else { gridBoundColumn = AssignmentGrid.GridBoundColumns["LoadGroup"]; colIndex = AssignmentGrid.GridBoundColumns.IndexOf(gridBoundColumn) + 1; if(cr != null && currentCell.ColIndex == colIndex) { cr.ListBoxPart.DataSource = loadGroups; AssignmentGrid.GridBoundColumns["LoadGroup"].StyleInfo.DataSource = loadGroups; } } } The FieldWorkerID Combo Box is: GridDropDownStyle.AutoComplete style and LoadGroup ComboBox is: GridDropDownStyle.Editable style. Changing the data source on the FieldWorkerID works but it does not on the "LoadGroup". I checked and re-checked in the Debugger that the data assigned to the "LoadGroup" cell is correct and it is. The renderer data source shows correct list ( in the debugger ) yet when the drop down list is displayed the new values does not show. What is happening here?

1 Reply

AD Administrator Syncfusion Team March 15, 2006 05:49 AM UTC

Hi Kstoj, Changing the ComboBox choice list dynamically in a cell works fine. Please refer to the attached sample and let us know if you are trying something different. Regards, Calvin.

41912.zip

Loader.
Live Chat Icon For mobile
Up arrow icon