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

GridViewCheckBoxColumn IsReadOnly Style

2 Answers 173 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.
Kyle
Top achievements
Rank 2
Veteran
Kyle asked on 06 Dec 2011, 11:02 PM
One of the complaints from our end-users is that they can't tell the difference between a checkbox cell that isn't in Edit Mode and one that is disabled/readonly.

After a lot of searching, I was finally able to make the checkbox column look and act like a standard Windows7Theme checkbox.  However, the IsReadOnly property doesn't seem to affect the style.  When IsReadOnly=true, it looks identical to IsReadOnly=false.  There is no IsEnabled property for the GridViewCheckBoxColumn, therefore, the VisualState x:Key="Disabled" does nothing.

How can I change the style of my GridViewCheckBoxColumn so that when IsReadOnly=true, it looks disabled?

Thanks,
Kyle

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 09 Dec 2011, 05:08 PM
Hi Kyle,

You can define CellTemplate for your column, place a CheckBox inside and manipulate its IsEnabled property (setting IsReadOnly property will not change its look).
Will that approach suit your needs ? 
 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Kyle
Top achievements
Rank 2
Veteran
answered on 13 Dec 2011, 07:44 PM
Hey Maya,

That worked almost flawlessly.  I like the standard Silverlight checkbox style, and now it is in the grid.

However, to bind the IsEnabled property to the actual property I wanted, it was easier to bind it to the IsReadOnly property of the RadGridView.  Therefore, I found http://www.telerik.com/community/forums/silverlight/gridview/elementname-binding-inside-of-celltemplate.aspx#1187483, and it was exactly what I needed.

Thanks!
Tags
GridView
Asked by
Kyle
Top achievements
Rank 2
Veteran
Answers by
Maya
Telerik team
Kyle
Top achievements
Rank 2
Veteran
Share this question
or