Hello Experts,
I have tried several ways to make the checkbox centered in GridViewDataColumn with no luck. Could anyone help me please? Below is my XAML code
Check box section
MyCheckBoxStyle Section :
Thanks in advance.
Regards,
Putra
I have tried several ways to make the checkbox centered in GridViewDataColumn with no luck. Could anyone help me please? Below is my XAML code
Check box section
<
telerik:GridViewDataColumn
CellStyle
=
"{StaticResource MyCheckBoxStyle}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<!--<CheckBox x:Name="chk" Content="" Click="Chk_OnClick" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="65,0,0,0" IsChecked="{Binding IsSelected, Mode=TwoWay}">-->
<
CheckBox
x:Name
=
"chk"
Content
=
""
Click
=
"Chk_OnClick"
IsChecked
=
"{Binding IsSelected, Mode=TwoWay}"
>
</
CheckBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.Header
>
<
CheckBox
x:Name
=
"chkAll"
IsChecked
=
"{Binding HasAllShopsMarked, Mode=TwoWay}"
Loaded
=
"ChkAll_Shop"
Checked
=
"ChkAll_Shop"
Unchecked
=
"ChkAll_Shop"
Content
=
"{Binding ResourceSet[MODULE_SETTINGS_SHOP_AUD_BATCH_UPDATE_ASSIGN_LBL], Source={StaticResource localSvc}, FallbackValue=Assign}"
Width
=
"Auto"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Margin
=
"10,0,0,0"
/>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
MyCheckBoxStyle Section :
<
Style
x:Key
=
"MyCheckBoxStyle"
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Center"
/>
</
Style
>
Thanks in advance.
Regards,
Putra