
Onur Mustafa
Top achievements
Rank 1
Onur Mustafa
asked on 28 Dec 2011, 11:11 AM
How we can change "boolean column grouping value" true false to our language. I want to use checkbox in my column, i do not want to change it.
if (propertyDescriptor.PropertyType == typeof(bool))
{
column.DataMemberBinding = new Binding(header.Key);
??????
}
if (propertyDescriptor.PropertyType == typeof(bool))
{
column.DataMemberBinding = new Binding(header.Key);
??????
}
4 Answers, 1 is accepted
0
Hello Onur,
I hope it helps.
Regards,
Maya
the Telerik team
You can try creating a converter and use it in the binding of the corresponding GroupHeaderTemplate. It could be something like follows:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
>
<
telerik:GridViewDataColumn.GroupHeaderTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Group.Key, Converter={StaticResource MyConverter}}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.GroupHeaderTemplate
>
</
telerik:GridViewDataColumn
>
I hope it helps.
Regards,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

Onur Mustafa
Top achievements
Rank 1
answered on 28 Dec 2011, 01:08 PM
Thanks for quick reply but we made a class and we wants to make all our list behave like that. How can we do this in our class ?
public class Lister : RadGridView
{
}
public class Lister : RadGridView
{
}
0

Onur Mustafa
Top achievements
Rank 1
answered on 28 Dec 2011, 01:15 PM
And I can not see GroupHeaderTemplate, there is only GroupFooterTemplate in GridViewDataColumn class?
0
Hello,
You can implement the same idea in your application as well. If it is appropriate for your scenario, you can define a DataTemplate in the Resources section and assign it to your grid for example.
However, the most appropriate implementation depends entirely on your exact settings and requirements.
Regards,
Maya
the Telerik team
Generally, both RadGridView and GridViewBoundColumnBase (GridViewDataColumn respectively) have GroupHeaderTemplate:
<
telerik:RadGridView
Name
=
"clubsGrid"
>
<
telerik:RadGridView.GroupHeaderTemplate
>
<
DataTemplate
>
....
</
DataTemplate
>
</
telerik:RadGridView.GroupHeaderTemplate
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
>
<
telerik:GridViewDataColumn.GroupHeaderTemplate
>
<
DataTemplate
>
.....
</
DataTemplate
>
</
telerik:GridViewDataColumn.GroupHeaderTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
You can implement the same idea in your application as well. If it is appropriate for your scenario, you can define a DataTemplate in the Resources section and assign it to your grid for example.
However, the most appropriate implementation depends entirely on your exact settings and requirements.
Regards,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>