Highlighting the selected row in a disabled grid

2 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    13 posts
    Member since:
    May 2009

    Posted 09 Apr 2014 Link to this post

    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).
  2. Yoan
    Yoan avatar
    1128 posts

    Posted 14 Apr 2014 Link to this post

    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.


    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.

Back to Top