This is a migrated thread and some comments may be shown as answers.
GridViewCheckBoxColumn Appears Disabled
1 Answer 14 Views
This is a migrated thread and some comments may be shown as answers.
Corey
Top achievements
Rank 2
Corey asked on 15 May 2014, 06:27 PM
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.

1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 16 May 2014, 01:50 PM
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.

Regards,
Boris Penev
Telerik
 
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.
 
Asked by
Corey
Top achievements
Rank 2
Answers by
Boris
Telerik team
Share this question
or