I want to use this article such that I can set the control size of sfCheckBox.
I have used
DataGridCheckBoxColumn but wasn't able to set the checkbox size.
I tried using C# code as below but it is not binding to viewmodel
// Define GridTemplateColumn for CheckBox
var checkboxColumn = new DataGridTemplateColumn
{
MappingName = "IsSelected",
Visible =true,
HeaderText = "Select",
CellTemplate = new DataTemplate(() =>
{
// Create a sfCheckBox and bind it to the "IsSelected" property
SfCheckBox checkBox = new SfCheckBox();
checkBox.SetBinding(SfCheckBox.IsCheckedProperty,
"IsSelected"
);
checkBox.ControlSize = 14;
return checkBox;
})
};
checkboxColumn.AllowEditing = true;
dataGrid.Columns.Add(checkboxColumn);
Please help in C# code to use sfCheckbox and
DataGridTemplateColumn to add column to sfDataGrid