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

Metro theme for SelectColumn

11 Answers 134 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Murray
Top achievements
Rank 2
Murray asked on 07 Aug 2012, 11:28 AM
Hi

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

Sort by
0
Murray
Top achievements
Rank 2
answered on 07 Aug 2012, 11:53 AM
Looking at this thread (http://www.telerik.com/community/forums/silverlight/gridview/gridviewselectcolumn-appearnace.aspx) I see that the SelectColumn should inherit from the CheckBox template, however this is not working for me.

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
0
Vanya Pavlova
Telerik team
answered on 09 Aug 2012, 08:06 AM
Hi Murray,

 

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.  



Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Murray
Top achievements
Rank 2
answered on 09 Aug 2012, 12:28 PM
Thank you for your response Vanya.

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.
0
Vanya Pavlova
Telerik team
answered on 09 Aug 2012, 12:51 PM
Hello Murray,

 

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.

0
Murray
Top achievements
Rank 2
answered on 09 Aug 2012, 01:07 PM
Thank you again, but unfortunately this does not work for the HeaderCheckBoxStyle. (see attached)

Version: 2012.2.607.1050
runtime Version: v4.0.30319
0
Murray
Top achievements
Rank 2
answered on 09 Aug 2012, 01:10 PM
Here is the code (see attached)

Also, even the default skin doesnt use the CheckBoxStyle. (I removed the application style to test)

0
Vanya Pavlova
Telerik team
answered on 09 Aug 2012, 01:13 PM
Hello Murray,

 


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? 



Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Murray
Top achievements
Rank 2
answered on 09 Aug 2012, 01:34 PM
Thanks. I will test and have the dev team update the project dlls as necessary. Will the template be fixed any time soon so I don't need to be explicit on every use of the SelectColumn? As this is a bug could I have my points updated? :)
0
Vanya Pavlova
Telerik team
answered on 09 Aug 2012, 01:39 PM
Hi Murray,

 


This issue is already fixed and the fix is available with our Service Pack (Q2 2012 SP1). 
Thank you!


Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Murray
Top achievements
Rank 2
answered on 09 Aug 2012, 01:48 PM
Ah do the latest dlls will fix the theme so I won't need to implicitly set the CheckBoxStyle on every instance of the SelectColumm? That's great news!
0
Vanya Pavlova
Telerik team
answered on 09 Aug 2012, 02:00 PM
Hi Murray,

 

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! 



Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Murray
Top achievements
Rank 2
Answers by
Murray
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or