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

DataGrid + GridTextColumn + DisplayBinding only with c#

Thread ID:





115392 Jan 15,2014 09:13 AM UTC Jan 17,2014 03:13 PM UTC WinRT 1
Tags: General
Thierry Maurel
Asked On January 15, 2014 09:13 AM UTC

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 ?
Thierry Maurel

Jai Ganesh S [Syncfusion]
Replied On January 17, 2014 03:13 PM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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