I have been searching through the provided theme templates and cannot find the template for the SelectColumn in the Metro theme. Can I get a copy of the XAML or be pointed to where it is in the Theme folder?
I am trying to correct the check to be a tick instead of a square. (not sure why you did this as it is not a normal design pattern). I have corrected the normal CheckBox template but the SelectColumn doesnt seem to inherit this control, hence needing to modify the GridViewSelectColumn template.
Thanks
Murray
11 Answers, 1 is accepted
We are using MVVM and in the past I have had issues getting proper reference to the ResourceDictionaries. Is there something I can do to implicitly tell the select column to reference the CheckBox template? (a BasedOn or something?)
Thanks again
Indeed the solution in the previously referenced forum thread demonstrates the recommended way to achieve this. GridViewSelectColumn uses the standard Microsoft CheckBox control and you should modify exactly this element. Can you clarify why the implicit style targeted at CheckBox is not working for you? Furthermore we have recently introduced two new properties CheckBoxStyle and HeaderCheckBoxStyle for GridViewSelectColumn which you may use to explicitly set the style for System.Windows.CheckBox.
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
After further investigation it seems the statement that "GridViewSelectColumn uses the standard Microsoft CheckBox control and you should modify exactly this element" is incorrect with the Metro theme.
I've created a sample project to illustrate this - http://dl.dropbox.com/u/7939626/Telerik_GridView_SelectColumn_Issue.zip
Being implicit with CheckBoxStyle seems to work on the checkboxes in the rows, however HeaderCheckBoxStyle does not work on the header.
Thank you for sharing this project with us!
Indeed the implicit style is not applied correctly in a theme different than the default one.
As a kind of workaround I may suggest you to explicitly set the HeaderCheckBoxStyles/CheckBoxStyles only for GridViewSelectColumn:
<
telerik:RadGridView.Columns
>
<
telerik:GridViewSelectColumn
HeaderCheckBoxStyle
=
"{StaticResource CheckBoxStyle}"
CheckBoxStyle
=
"{StaticResource CheckBoxStyle}"
/>
</
telerik:RadGridView.Columns
>
The implicit style which is based on the one with key CheckBoxStyle will handle the rest CheckBox elements.
Kind regards,
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Version: 2012.2.607.1050
runtime Version: v4.0.30319
Also, even the default skin doesnt use the CheckBoxStyle. (I removed the application style to test)
Considering the version you used we had this issue, which was fixed after the official release of Q2 2012. Will you please try using binaries as part of our Q2 2012 SP1 and let me know whether the issue still persists?
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
This issue is already fixed and the fix is available with our Service Pack (Q2 2012 SP1).
Thank you!
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Thank you for getting back to us! Actually your application hits two issues:
1. The HeaderCheckBoxStyle is not applied to the GridViewSelectColumn.
2. An implicit style targeted at CheckBox is not evaluated by GridViewSelectColumn in a theme different than the default one.
The first one is already fixed and the fix is available with our Service Pack (Q2 2012 SP1). Rather unfortunately the second one still persists. By that reason as a kind of workaround I suggested you to explicitly set the style targeted at CheckBox in your GridViewSelectColumn.
As per the second issue I have already updated your Telerik points!
Vanya Pavlova
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.