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

Setting DataSource of same column on different rows

Thread ID:





93439 Mar 15,2010 12:32 PM UTC Mar 16,2010 03:59 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 15, 2010 12:32 PM UTC

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

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



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