GridViewCheckBoxColumn Appears Disabled

2 posts, 0 answers
  1. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 15 May 2014 Link to this post

    We have a RadGridView with an editable GridViewCheckBoxColumn.  However, whenever the grid is not in Edit Mode, the check boxes in that column appear disabled.  This sometimes causes users to believe that they aren't editable.  We want the check boxes to always appear as they do when the grid is in Edit Mode.

    I've seen a few other forum posts about editing templates and xaml in order to get the desired appearance, but I was wondering if there was anyway to do this programmatically?  We don't use xaml to create our grids and we rarely use xaml to set styles and whatnot.  Any assistance would be much appreciated.
  2. Boris
    Boris avatar
    276 posts

    Posted 16 May 2014 Link to this post

    Hello Corey,

    There is a similar CheckBox Column looks disabled forum thread where you can look at the solution for this issue. As for recreating the Template of the GridViewCheckBox programmatically it is possible. However, it would be a lot harder than just writing it in XAML and then accessing the resources programmatically. Because resource dictionaries are simple collections exposed as public properties, nothing prevents you from accessing a resource dictionary’s items directly in source code. For
    example, you could set a Button’s Background and BorderBrush properties as follows in
    C# (assuming a Window object called window):

    Button button = new Button();
    button.Background = (Brush)window.Resources[“backgroundBrush”];
    button.BorderBrush = (Brush)window.Resources[“borderBrush”];

    I hope this helps.

    Boris Penev
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft R3 2016 release webinar banner
Back to Top