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

Merge two columns

Hi all, Is there a way I can merge two columns from my datasource into a single column in a databound grid? TIA

4 Replies

AD Administrator Syncfusion Team October 1, 2003 09:11 AM

You can override QueryCellInfo and there provide the cell information for that specific column. If QueryCellInfo does not fit your needs then try DataProviderQueryCellInfo and don't forget to set e.Handled =true; The difference betwen those two events is: DataProviderQueryCellInfo is called before GridModelDataBinder.QueryCellInfo gets the data from the underlying datasource and initializes the style object. QueryCellInfo is called after that. So depending on your situation one or the other might fit better. If you need to hide the other column you can do that with Model.HideCols. Stefan


AD Alberto del Barrio October 1, 2003 09:41 AM

But you mean I override that methods or just add an event handler to the corresponding event?


AD Administrator Syncfusion Team October 1, 2003 09:43 AM

Event handler is fine. Stefan


GG Gene Gorokhovsky October 1, 2003 10:59 AM

You can also dynamically add an expression column to your table (DataTable.Columns.Add) and bind grid column to it. Of course the resulting data will be read-only. Gene > Hi all, > > Is there a way I can merge two columns from my datasource into a single column in a databound grid? > > TIA >

Loader.
Live Chat Icon For mobile
Up arrow icon