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

How do I fix the DataSource of one ComboBox cell depending upon the value of another binded column

Thread ID:





94543 May 19,2010 05:13 PM UTC May 25,2010 11:47 AM UTC ASP.NET Web Forms (Classic) 3
Tags: GridGroupingControl
Asked On May 19, 2010 05:13 PM UTC

I'm using a GridDataBoundGrid with 2 columns A and B

The A column is composed of static cells and contains several value

The B column is composed of combobox cells whoses values depands on the A column

>> during the data binding, how do i fix the datasource of my combobox cells depending on the value in the A column ?



Christopher Issac Sunder K [Syncfusion]
Replied On May 21, 2010 02:49 PM UTC

Hi Yoan,

Thank you for your interest in Syncfusion products.

Your mentioned query about “DataSource of one ComboBox cell depending upon the value of another binded column in GridDataBoundGrid” can be achieved by handling the “QueryCellInfo” event with the following code. This “QueryCellInfo” event raises event time when a small changes has been done.

if (e.ColIndex == 2 && e.RowIndex>0)
e.Style.CellType = "ComboBox";
e.Style.ChoiceList = null;
string sno = this.gridDataBoundGrid1.Model[e.RowIndex, 1].CellValue.ToString();
switch (sno)
case "1":
e.Style.DataSource = GetTable1();
e.Style.DisplayMember = "StudentID";
e.Style.ValueMember = "StudentID";

Please refer the following sample which illustrates the behavior of dataBinding in GridDataBoundGrid.


Let me know if you have any further concerns.

Christopher K.

Replied On May 25, 2010 08:00 AM UTC

ok, thanks

Christopher Issac Sunder K [Syncfusion]
Replied On May 25, 2010 11:47 AM UTC

Hi Yoan,

Thanks for the update.

Christopher K.


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