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.

DataGrid + GridTextColumn + DisplayBinding only with c#

Thread ID:

Created:

Updated:

Platform:

Replies:

115392 Jan 15,2014 04:13 AM Jan 17,2014 10:13 AM WinRT 1
loading
Tags: General
Thierry Maurel
Asked On January 15, 2014 04:13 AM

Hello,
I recently discover the support of ExpandoObject in the DataGrid, so I can optimize my application with that feature to show generic list of data in a DataGrid like an Excel table.
I can generate the GridColumns and the ItemSource entirely in c#, with a minimal XAML part, just binding to a collection of Columns and ExpandoObjects.
However, in the GridTextColumn creation, I have a problem concerning the DisplayBinding, because if I need to add a converter (for the sort of my data), I don't know how to declare it in c#. My problem is about the 'Source' attribute of the Binding object in the context of GridTextColumn.
Any idea ?
Regards
Thierry Maurel


Jai Ganesh S [Syncfusion]
Replied On January 17, 2014 10:13 AM

Hi Thierry,

 

Thanks for contacting Syncfusion support.

 

We have analyzed your query. When setting the DisplayBinding in GridTextColumn, the binding expression is copied to all GridCells in that particular column and RowData (item in the DataGrid ItemSource) set as the data context of the GridCell. This data context will act as the Source to the binding expression that is defined in the DisplayBinding.

 

Please let us know if you need further assistance.

 

Thank you,

Jai Ganesh S


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.

;