Styling problem with GridViewCheckBoxColumn

2 posts, 1 answers
  1. Wolfgang Weilguny
    Wolfgang Weilguny avatar
    2 posts
    Member since:
    Feb 2010

    Posted 24 May Link to this post

    Hello telerik,

    i am using within a RadGridView in Win8Touch Theme a GridViewCheckBoxColumn with Binding to a Boolean.

    Technically everything works fine.

    But there seems to be a design bug.

    If a checkbox has the focus, the design of the checkbox is displayed properly. If it doesn't have the focus, the checkbox seems to be cut off.

    Here a simplified code snippet

    <telerik:RadGridView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Path=UserRights.UserRights}" telerik:StyleManager.Theme="Windows8Touch" ShowGroupPanel="False" AutoGenerateColumns="False" >
       <telerik:RadGridView.Columns>
          <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsRightGranted}" IsReadOnly="False" Width="60" UniqueName="Right.IsGranted" IsFilterable="False" AutoSelectOnEdit="True" EditTriggers="CellClick" />
       </telerik:RadGridView.Columns>
    </telerik:RadGridView>

    I have also attached a screenshot displaying this style problem.

    Thank you for your help.

    Mike

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 25 May Link to this post

    Hello Wolfgang,

    The difference in appearance comes from the fact that when not in focus, the element displayed for the GridViewCheckBoxColumn is a GridViewCheckBox, while when you enter edit mode, the GridViewEditorPresenter holds an ordinary CheckBox. This modification has been made due to performance reasons, but luckily, you can easily style the GridViewCheckBox control to mimic the appearance of the default MS CheckBox. You can read more on the topic in our Styling GridViewCheckBoxColumn article.

    I'm attaching a sample project to demonstrate this. Feel free to further modify the extracted style to your liking.

    Do let me know if you have any further questions or concerns.

    Regards,
    Dilyan Traykov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top