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

Setting DataSource of same column on different rows

Hi Support Team,

I would like to inquire infromation where how I would
be able to set the DataSource of same column differently on
different rows.

I am using "GridDataBoundGrid" and column's CellType has been set as "ComboBox". Normally we bind the Column as following
Column.DataSource= DataTable or something else

But in my particular case, I would like to set the ComboBox's DataSource differently on each row i.e. 1st row may needs to show
only 3 countries and 2nd row may needs to show 10.

Could you please let us know whether this function is available
OR we can only set the Column's DataSource which will apply on
all the rows shown in the Grid?

Looking forward for your reply.

Thanks and regards,

Ian Casey


1 Reply

CB Clay Burch Syncfusion Team March 16, 2010 03:59 PM UTC

If you want cell style properties to vary row by row in a column in a GridDataBoundGrid, then you need to handle the grid.Model.QueryCellInfo event and set the style properties in that event handler. Here is a little sample that changes the datasource of a combobox column for every third row.



WindowsFormsApplication54_4de9949b.zip

Loader.
Live Chat Icon For mobile
Up arrow icon