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.
Unfortunately, activation email could not send to your email. Please try again.

Setting DataSource of same column on different rows

Thread ID:

Created:

Updated:

Platform:

Replies:

93439 Mar 15,2010 08:32 AM Mar 16,2010 11:59 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 15, 2010 08:32 AM

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 11:59 AM

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

CONFIRMATION

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.

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.

;