This is a migrated thread and some comments may be shown as answers.

Radgrid multilanguage problem

1 Answer 123 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Kreshnik asked on 21 Oct 2011, 04:27 PM
Hello telerik team,

Main problem:
I'm having a problem with the RadGridView column header text localization

I've added a new language to my form(s) and therin are RadGridView controls,
after localization is completed to all forms, while change/add some new columns for the radGridView
the designer code generator that generates the code renames columns automatically (at design time),
and makes the resource file in the other language unuseable for the translated columns.

 i.e. I added in a language (resource file of form) a headerText in the resource file, but when I change some column property in the property builder the columns gets regenerated and renames automatically in the .designer class, and therefore some translations may not apply because of their 'new name'. I do very often changes to the RadGridView, but how to avoid this ?

Version of telerik win controls I use:
RadControls for winForms Q1 2011

RadGridView.dll Version: 2011.1.11.315
Visual Studio 2010 Ultimate Version

Thanks in advance

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Oct 2011, 05:00 PM
Hi Kreshnik,

Thank you for writing.

This is a known issue in RadGridView which will be addressed in one of our next releases. You can find an item for it in our Public Issue Tracking System.

Because of the nature of the issue, it cannot be avoided at design-time. The only workaround that you can use in this case involves setting the strings of your RadGridView columns at runtime by code, for example:

string cultureName = Thread.CurrentThread.CurrentUICulture.Name;
switch (cultureName)
    case "en-US":
        this.radGridView1.Columns["FirstName"].HeaderText = "First Name";
        this.radGridView1.Columns["LastName"].HeaderText = "Last Name";
        this.radGridView1.Columns["City"].HeaderText = "City Name";
    case "ar-EG":
        this.radGridView1.Columns["FirstName"].HeaderText = "الاسم الأول";
        this.radGridView1.Columns["LastName"].HeaderText = "اسم العائلة";
        this.radGridView1.Columns["City"].HeaderText = "مدينة";

With the help of this code snippet the header text of your columns will not depend on the design-time localization which causes the issues.

I hope this helps.

the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question