Default style for GridViewCheckBox

13 posts, 0 answers
  1. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 17 May 2011 Link to this post

    I changed my Checkbox to display a ? instead of - when the value is null by changing the IndeterminateIcon from a rectangle to a path that resemble a "?".  Can you provide the default style for the GridViewCheckBox so I can do the same?
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 May 2011 Link to this post

    Hello Edward,

     

    You may change this by altering the appearance of GridViewCheckBox and replace the indeterminate icon with a TextBlock, which Text property is set to "?", please refer to the attached picture. 
    If you need any further assistance do not hesitate to contact us!


    Best wishes,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 18 May 2011 Link to this post

    I made the change and while the ? is showing up, once I switch to edit mode then it defaults back to the -.  Is there a EditTemplate somewhere?
  4. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 May 2011 Link to this post

    Hi Edward,

     

    When GridViewCheckBoxColumn goes into edit mode the standard CheckBox appears. If you want to maintain the same behavior in edit mode you should change the Indeterminate icon for CheckBox control in the same way and apply it within GridViewCheckBoxColumn's EditorStyle, as shown below:

    <Style x:Key="style1" TargetType="CheckBox">
    .....The rest of your style
    </Style>
     
    <telerik:GridViewCheckBoxColumn EditorStyle="{StaticResource style1}" ... />


    You may also mark this style as an implicit without specifying the x:Key attribute and it will be applied to all CheckBox in your current application.

    Greetings,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 May 2011 Link to this post

    Hi Edward,

     

    When GridViewCheckBoxColumn goes into edit mode the standard CheckBox appears. If you want to maintain the same behavior in edit mode you should change the Indeterminate icon for CheckBox control in the same way and apply it within GridViewCheckBoxColumn's EditorStyle, as shown below:

    <Style x:Key="style1" TargetType="CheckBox">
    .....The rest of your style
    </Style>
     
    <telerik:GridViewCheckBoxColumn EditorStyle="{StaticResource style1}" ... />


    You may also mark this style as an implicit without specifying the x:Key attribute and it will be applied to all CheckBoxes in your current application.


    Greetings,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 18 May 2011 Link to this post

    I already have a implicit checkbox style defined, using the ? instead of -.  However, the checkbox inside the grid still use -, where the checkbox outside of the grid use ?.

    In fact, I don't think the checkbox in edit mode is the same as the regular checkbox at all.  The default checkbox in grid edit mode has 2 borders (so the tick in it is smaller), while the normal checkbox only have 1 border.
  7. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 May 2011 Link to this post

    Hello Edward,

     

    The CheckBox control is one of the native Silverlight controls supported by our theming mechanism.
    As you might know we ship our themes as separate projects. You may get the xaml files for any Telerik theme from the Themes folder of your personal installation. May you please open the Themes/Office_Black folder, find the CheckBox.xaml file. Copy this style to your current project change the Indeterminate icon to "?", mark this style as an implict and let me know what happens. 


    Greetings,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 18 May 2011 Link to this post

    I already have a style for checkbox using the ?, defined as implicit in one of my resource dictionary file.  That style is working fine outside of the grid.  I saw that file, but it is largely a duplicate of my own and it is just another implicit style.  

    I am guessing the implicit style stored under the theme is overriding my own implicit style.  If that's true then I need to edit then recompile all the themes myself?
  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 18 May 2011 Link to this post

    Hi Edward,

     

    Indeed the styles are theme specific and they use their own resources for a particular theme. In each theme you have a separate styles for a control and its parts. For example: if you want to change the CheckBox in Windows7Theme you may copy only the style for this control in Windows7 theme to your current project and modify in in a desired way. Then the changes will be reflected correspondingly.  


    Please let me know if you need a sample project that demonstrates this approach.



    All the best,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 18 May 2011 Link to this post

    I said I already have a working implicit style with my checkbox.  But anyways, I removed my own working copy, then copy the one from OfficeBlack to my project and modified it there.

    At the end, nothings change:  checkbox outside of the grid reflects the changes; checkbox inside the grid does not.  
  11. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 24 May 2011 Link to this post

    Hello Edward,

     

    I have prepared an example for you using binaries as part of our latest internal build that demonstrates how this can be achieved.


    All the best,
    Vanya Pavlova
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. arun
    arun avatar
    4 posts
    Member since:
    Jun 2010

    Posted 15 Feb 2012 Link to this post

    Hi Vanya Pavlova,


    Iam using gridviewcheckbox column,i want to assign dropshadow effect to my gridviewcheckbox column..

    for eg in normal check box in silverlight:

    List<CheckBox> chkList = AddFirmUser._addFirmUserInstance.dataGridPortalList.GetVisualOfType<CheckBox>().Where(c => c.Name == "chkActive").ToList();
                           if (chkList.Count > 0)
                           {
                               foreach (CheckBox chk in chkList)
                               {
                                   chk.Effect = (DropShadowEffect)Resources["HelpEffect"];
                               }
                               Storyboard.SetTarget(storyForWizard, chkList[0]);
                               storyForWizard.Begin();
                           }

    How to write for telerik gridviewcheckbox
    column in silverlight.i tried by this ..its not working

    List<GridViewCheckBoxColumn> chkList = AddFirmUser._addFirmUserInstance.dataGridPortalList.GetVisualOfType<GridViewCheckBoxColumn>().Where(c => c.UniqueName == "chkActive").ToList();
                           if (chkList.Count > 0)
                           {
                               foreach (GridViewCheckBoxColumn chk in chkList)
                               {
                                   chk.Effect = (DropShadowEffect)Resources["HelpEffect"];
                               }
                               Storyboard.SetTarget(storyForWizard, chkList[0]);
                               storyForWizard.Begin();
                           }


    Is it possible for grid view check box column telerik silverlight?
  13. arun
    arun avatar
    4 posts
    Member since:
    Jun 2010

    Posted 16 Feb 2012 Link to this post

    Pls reply for my Post!
Back to Top