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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG Dropdown list values.

Thread ID:





41912 Mar 14,2006 09:21 PM UTC Mar 15,2006 05:49 AM UTC WinForms 1
Tags: GridControl
Asked On March 14, 2006 09:21 PM UTC

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?

Administrator [Syncfusion]
Replied On 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.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon