Metro theme for SelectColumn

12 posts, 0 answers
  1. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 07 Aug 2012 Link to this post

    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
  2. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 07 Aug 2012 Link to this post

    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
  3. DevCraft banner
  4. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2012 Link to this post

    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.

  5. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 09 Aug 2012 Link to this post

    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.
  6. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2012 Link to this post

    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.

  7. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 09 Aug 2012 Link to this post

    Thank you again, but unfortunately this does not work for the HeaderCheckBoxStyle. (see attached)

    Version: 2012.2.607.1050
    runtime Version: v4.0.30319
  8. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 09 Aug 2012 Link to this post

    Here is the code (see attached)

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

  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2012 Link to this post

    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.

  10. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 09 Aug 2012 Link to this post

    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? :)
  11. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2012 Link to this post

    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.

  12. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 09 Aug 2012 Link to this post

    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!
  13. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Aug 2012 Link to this post

    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.

Back to Top
DevCraft banner