New to Telerik UI for ASP.NET MVC? 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 MVC |
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"))
)
)
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.