New to Telerik UI for ASP.NET Core? Start a free 30-day trial
How to Set a Grid CheckBox to Checked for New Records
Updated on Oct 28, 2026
Environment
| Product Version | 2023.1.117 |
| Product | Grid for ASP.NET Core |
Description
When you add a new record in the Grid, a CheckBox bound to a Boolean field may appear unchecked. To have it checked by default, set the field's default value in the Grid DataSource model.
Solution
- Define a Boolean property in the model and bind a Grid column to it.
- Set the field's default value to
truein the Grid DataSource model. - Configure the Grid to allow users to add records.
The following model uses TestBoolean for the CheckBox field:
C#
public class OrderViewModel
{
public int OrderID { get; set; }
public bool TestBoolean { get; set; }
}
HtmlHelper
Set DefaultValue(true) on the Boolean field in the DataSource model:
HtmlHelper
@(Html.Kendo().Grid<OrderViewModel>()
.Name("orders")
.Columns(columns => columns
.Bound(order => order.TestBoolean))
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(order => order.OrderID);
model.Field(order => order.TestBoolean).DefaultValue(true);
})
.Read(read => read.Action("Orders_Read", "Grid"))
.Create(create => create.Action("Orders_Create", "Grid"))
.Update(update => update.Action("Orders_Update", "Grid"))
)
)
TagHelper
Set the Boolean field's default-value to true in the DataSource schema:
TagHelper
@addTagHelper *, Kendo.Mvc
<kendo-grid name="orders">
<toolbar>
<toolbar-button name="create" />
</toolbar>
<editable mode="popup" />
<columns>
<column field="TestBoolean" />
</columns>
<datasource type="DataSourceTagHelperType.Ajax" page-size="20">
<transport>
<read url="@Url.Action("Orders_Read", "Grid")" />
<create url="@Url.Action("Orders_Create", "Grid")" />
<update url="@Url.Action("Orders_Update", "Grid")" />
</transport>
<schema>
<model id="OrderID">
<fields>
<field name="TestBoolean" type="boolean" default-value="true"></field>
</fields>
</model>
</schema>
</datasource>
</kendo-grid>
Test the Behavior
- Open the Grid and select Add new record.
- Confirm that the
TestBooleanCheckBox is checked in the popup editor. - Save the record and confirm that
TestBooleanistrue.