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.

Merge two columns

Thread ID:

Created:

Updated:

Platform:

Replies:

7564 Oct 1,2003 08:31 AM Oct 1,2003 10:59 AM Windows Forms 4
loading
Tags: GridControl
Alberto del Barrio
Asked On October 1, 2003 08:31 AM

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

Administrator [Syncfusion]
Replied On 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

Alberto del Barrio
Replied On October 1, 2003 09:41 AM

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

Administrator [Syncfusion]
Replied On October 1, 2003 09:43 AM

Event handler is fine. Stefan

Gene Gorokhovsky
Replied On 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 >

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.

;