Changing Check style in GridViewCheckBoxColumn

0 Answers 60 Views
Badge
HS
Top achievements
Rank 1
HS asked on 11 Oct 2023, 01:48 AM

Dear Team Telerik

 

Hello. I want to change the style of check in GridViewCheckBoxColumn.

For example, is it possible change check figure to OK OR NG figure?

If it's possible plz let me know

Thanks.

Dinko
Telerik team
commented on 13 Oct 2023, 02:48 PM

Hello,

In order to achieve this requirement, instead of using a GridViewCheckBoxColumn I would suggest to use a GridViewDataColumn. In the cell template of the column, you can use the default CheckBox.

<telerik:RadGridView.Columns>
	<telerik:GridViewDataColumn>
		<telerik:GridViewDataColumn.CellTemplate>
			<DataTemplate>
				<CheckBox x:Name="checkBox" IsChecked="{Binding IsActive}" />
			</DataTemplate>
		</telerik:GridViewDataColumn.CellTemplate>
	</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>

To change the style of the check mark you can take the default Style of the CheckBox and modify the Template property. Instead of using a Path in the Border element, you can use a RadGlyph for the CheckMark and UncheckedMark checkers.

<Border x:Name="Border">
	<Grid>
		<telerik:RadGlyph x:Name="CheckMark"
						  Visibility="Collapsed"
						  SnapsToDevicePixels="False"
						  Glyph="&#xe118;"/>
						  
		<telerik:RadGlyph x:Name="UncheckedMark"
						  Visibility="Collapsed"
						  Glyph="&#xe11b;"
						  SnapsToDevicePixels="False" />
	</Grid>
</Border>

You can find a sample solution attached where this logic is implemented.

No answers yet. Maybe you can help?

Tags
Badge
Asked by
HS
Top achievements
Rank 1
Share this question
or