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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Merge two columns

Thread ID:

Created:

Updated:

Platform:

Replies:

7564 Oct 1,2003 12:31 PM UTC Oct 1,2003 02:59 PM UTC WinForms 4
loading
Tags: GridControl
Alberto del Barrio
Asked On October 1, 2003 12:31 PM UTC

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 01:11 PM UTC

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 01:41 PM UTC

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

Administrator [Syncfusion]
Replied On October 1, 2003 01:43 PM UTC

Event handler is fine. Stefan

Gene Gorokhovsky
Replied On October 1, 2003 02:59 PM UTC

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.

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

;