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

Styling problem with GridViewCheckBoxColumn

1 Answer 238 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wolfgang Weilguny
Top achievements
Rank 1
Veteran
Wolfgang Weilguny asked on 24 May 2016, 06:49 AM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 25 May 2016, 03:34 PM
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.
Tags
GridView
Asked by
Wolfgang Weilguny
Top achievements
Rank 1
Veteran
Answers by
Dilyan Traykov
Telerik team
Share this question
or