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
close icon

Header text binding

Hi,

For displaying data of (dynamic) objects, I am using the GridDataControl in a multi-lingual app.
I need to bind the header text to an object that does the translation. How can this be achieved?
I prefer a solution in code behind.

Thanks for your help.

2 Replies

WK Willem Kaal August 30, 2010 12:29 PM UTC

This question has already been answered in the following posts:
http://www.syncfusion.com/support/forums/grid-wpf/91666/Can-you-databind-headertext?


JJ Jeraldes J Syncfusion Team September 7, 2010 11:42 AM UTC

Hi WK,

Thank you for using Syncfusion products.

We have developed a sample as per your requirement. In our sample we have used the MappingName of the column name and then we will be changing the Column Header text. This would help you in solving your issue.

Please refer the code snippet and sample from the following:

[Code Snippet]

this.dataGrid.ItemsSource = new Task2();
var CT = (from vc in this.dataGrid.VisibleColumns where vc.MappingName == "Language" select vc).First();
var a = new TaskDetails();
CT.HeaderText = a[1].Language.ToString();

[Sample Link]

http://www.syncfusion.com/uploads/redirect.aspx?file=GCD-DynamicHeaderTextChange-96222_d620dd5.zip&team=development

Let us know if you need any other details.

Regards,
Jeraldes J




Loader.
Live Chat Icon For mobile
Up arrow icon