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

radgrid footer aggregate translation

5 Answers 153 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zÿm
Top achievements
Rank 1
Zÿm asked on 24 Nov 2011, 12:05 PM
Hi

 How do i translate footer values such as "Sum", "Avg" in resource file? Is it possible? What are the key names of these items.

5 Answers, 1 is accepted

Sort by
0
Zÿm
Top achievements
Rank 1
answered on 28 Nov 2011, 08:57 AM
So? It is simple question. Does anyone know the answer?
0
Pavlina
Telerik team
answered on 28 Nov 2011, 03:30 PM
Hello Sunboz,

Unfortunately, RadGrid does not expose any public properties for automatic localization of its control text. The only approach you can take is to manually find the text in the controls collection of the grid and modify it to a localized equivalent. Here is a code snippet showing how to achieve this:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFooterItem)
        {
            var item = e.Item as GridFooterItem;
            TableCell cell = item["ColumnUniqueName"];
            cell.Text = cell.Text.Replace("Sum", "Localized text");
        }
    }

Kind regards,

 

Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Zÿm
Top achievements
Rank 1
answered on 29 Nov 2011, 09:02 AM
Sorry, maybe I was unclear, i as talking about this
http://code.google.com/p/oshareinventario/source/browse/trunk/nw/nwWEB/App_GlobalResources/RadGrid.Main.resx?spec=svn29&r=29

"RadGrid.Main.resx" resource file, i can't find there a aggregate function name values :/. Is it possible to translate them through resource files? CodeBehind translation is not a solution.

Sorry again
0
Accepted
Pavlina
Telerik team
answered on 29 Nov 2011, 02:10 PM
Hi Sunboz,

Please examine the project from the last post in the following forum thread and let me know if this solution is applicable for you:
http://www.telerik.com/community/forums/aspnet-ajax/grid/localization-of-footeraggregateformatstring.aspx

Regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Zÿm
Top achievements
Rank 1
answered on 29 Nov 2011, 04:30 PM
Thanks that helped :)

in addition. RadGrid.Main.resx file is missing aggregate function texts, so i uesd FooterAggregateFormatString="<%$ Resources: RadGrid.Main, SumText %>". I hope this will be helpful for someone. Take care.
Tags
Grid
Asked by
Zÿm
Top achievements
Rank 1
Answers by
Zÿm
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or