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

Header text binding

Thread ID:

Created:

Updated:

Platform:

Replies:

96222 Aug 30,2010 10:02 AM UTC Sep 7,2010 11:42 AM UTC WPF 2
loading
Tags: GridControl
Willem Kaal
Asked On August 30, 2010 10:02 AM UTC

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.

Willem Kaal
Replied On 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?

Jeraldes J [Syncfusion]
Replied On 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




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

;