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

Adding dynamic datasource to dynamic Combobox''s in Grid Control

Thread ID:





60914 May 15,2007 11:52 AM UTC May 17,2007 05:36 PM UTC WinForms 3
Tags: GridControl
Asked On May 15, 2007 11:52 AM UTC


I have a grid Control, I would like to dynamically add rows(on a event) in a grid, in which two of the columns contain comboboxes, If i change the selection of one combobox, I would like to dynamically bind the other combobox (based on the selection). Could you please show hw this possible in the Syncfusion grid and give some pointers towards the same.

Thanks in Advance.

Raul D'souza

haneefm [Syncfusion]
Replied On May 15, 2007 04:04 PM UTC

Hi Rahul,

If you wan to change the datasource for the specific cell based on some condition then handle the CurrentCellShowingDropDown event to place your new datatable directly into the GridComboBoxCellRenderer.ListBoxPart. This will affect the dropped cell datasource. Please refer to the attached sample for implementation and let me know if this helps.

Sample : ComboxDatasource.zip

Also refer the below KBs for more information.

Best regards,

Replied On May 17, 2007 04:50 PM UTC

hey Haneef,

Thanks a lot for your help, However I am a newbie to Syncfusion grid and would also like to know hw do I add a new row in DGBG?

haneefm [Syncfusion]
Replied On May 17, 2007 05:36 PM UTC

Hi Rahul,

Thank you for your update.

Issue 1: showing AddNewRow..

If you want to to show the extra row( Addnew row ) in a grid, you can set the EnableAddNew property to True.

this.gridDataBoundGrid1.EnableAddNew = false;

Issue 2: adding a new row.

To add or remove rows in a grid, you just do it by working with the underlying datasource. The grid should automatically reflect the changes. Here is a code snippet that show this.

DataTable dt = this.gridDataBoundGrid1.DataSourec as DataTable.
DataRow dr = dt.NewRow();
dr[0] = "NewRow";

Best regards,


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

This page will automatically be redirected to the 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