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

Highlighting the selected row in a disabled grid

1 Answer 19 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 09 Apr 2014, 08:56 AM
When you select a row in a Grid View it is highlighted so that it is clear which row is selected.
In our application we use a GridView to allow the user to select an item and then edit parameters for that item.
However, when they start editing parameters, we disable the GridView to prevent the user selecting another item until they have saved or discarded their changes.

The problem we are having is that, as soon as we disable the grid view we lose the highlight showing which row/item in the grid is selected.
Is there a way to amend the Grid View style(s) to keep the selected row visually highlighted even when the grid view itself is disabled?
(For example, display the selected row in a slightly darker grey than the disabled look of the other rows).

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 14 Apr 2014, 07:46 AM
Hi Jonathan,

In order to achieve your goal, you need to manipulate the Disabled state of GridViewCell element. Please check the Styling a Cell help article for more information. I have prepared a sample project using our Implicit Styles. Please check the changes I made in the Themes/ Telerik.Windows.Controls.GridView.xaml file.

Regards,
Yoan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or