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

DataGrid + GridTextColumn + DisplayBinding only with c#

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

1 Reply

JG Jai Ganesh S Syncfusion Team 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

Live Chat Icon For mobile
Up arrow icon