I have a grid view with a checkbox column representing boolean values (true/false). When I'm trying to add a filter on this column, I see True and False as teh boolean text values. I want to know if it's possible to translate those values?
Thank's
6 Answers, 1 is accepted
Actually, the distinct values in the filter are based on the underlying property. As it this case, they are boolean values - true and false - the distinct values display - true and false.
What you may try is to create a converter returning the translated strings, but still define your column as follows:
<
telerik:GridViewDataColumnDataMemberBinding
=
"{Binding IsChampion, Converter={StaticResource MyConverter}}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBoxIsChecked
=
"{Binding IsChampion,Mode=TwoWay}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
I am sending you a sample project illustrating the suggested approach.
Kind regards,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
is it possible to have the same theme (style ) than my application (OfficeBlue) with this solution?
Thank's
I am sending you the sample project updated with Office_Blue Theme being set. Furthermore, only after I had read your second post, I realized you are using RadGridView for WPF, not for Silverlight. So, this time the project targets WPF. Please excuse me for the misunderstanding. Could you take a look at the sample project and let me know in case you need any further assistance ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Or is there any other way to translate the content of a radgrid?
In my case I have string values which should be interpreted and shown in a rad grid depending of the selected language.
All this done in a RadGrid in a web application.
Could you share a bit more details about your exact scenario ? Which version of RadGridView you are working with - Silverlight, ASP. NET ? Do you want to translate the elements of the grid itself or its items ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I use Telerik ASP.NET AJAX (Q2 2011).
My use case looks like that:
in a table I have a column with string values like "A" (stands for Automatic) , "M" (stands for Manual) and "C" (stands for Closed).
Now I want to display this table but don't want to see the sting values (A, M, C) but the translated values like Automatic, Manuel, Closed (in english) or their equivalents in other languages, depending on selected language of course.
The user must be also able to filter by the translated value (not the value in the database).
Right now I use telerik:RadGrid and telerik:GridBoundColumn (in a MasterTableView) to display the values.
How can I convert and filter the A, M, C values into translated values? (For example display and filter on "Automatic" instead of "A" in the database).
P.S.: I have already a translation table and method which gets the translations for headers and other strings in the page.
It works fine but I can't translate the values in the RadGrid column itself.
<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid"
AllowSorting
=
"True"
Width
=
"100%"
Height
=
"100%"
AllowFilteringByColumn
=
"true"
EnableHeaderContextMenu
=
"true"
AutoGenerateColumns
=
"false"
OnItemCreated
=
"RadGrid_ItemCreated"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
UniqueName
=
"Assignability"
DataField
=
"Assignability"
/>
[..]
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>