Hi Keith A Price,
The GridCheckBoxColumn in SfDataGrid by default displays a checkbox centered in
the GridCell. Unfortunately, it is not possible to align the checkbox alone in
the column.
However, if you enable the AllowText property, you can
display the text along with the checkbox in the GridCheckBoxColumn. In this
scenario, you can align the checkbox using the CheckBoxAlignment property in
the SfDataGrid.Style.CheckBoxStyle. This property allows you to position the
checkbox to the left or right of the cell. By utilizing this property, you can
customize the appearance of the checkbox and text in the GridCheckBoxColumn
according to your preferences. Refer to the below code snippet,
// Enable the AllowText property for the
CheckBoxColumn
(sfDataGrid.Columns["IsShipped"] as GridCheckBoxColumn).AllowText = true;
// Set the CheckBoxAlignment property for
the CheckBoxColumn. It will reflect only when AllowText enabled in
GridCheckBoxColumn
sfDataGrid.Style.CheckBoxStyle.CheckBoxAlignment =
CellCheckBoxAlignment.Left;
|
UG Link: https://help.syncfusion.com/windowsforms/datagrid/columntypes#text-on-the-check-box-column
Regards,
Vijayarasan S
If this post is helpful, please consider Accepting it as the solution so that
other members can locate it more quickly.