Kendo UI for jQuery documentation at http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.selectable states
"As of the Kendo UI R2 2017 SP1 release, the selection of columns with checkboxes is a built-in feature for the Grid..."
There does not seem to be a HtmHelper in Razor in Telerik UI for ASP.NET MVC for adding the selectable 'column' of checkboxes as in the manner shown for Kendo UI sample at https://dojo.telerik.com/ehaDo
In this sample, a SQL pivot view is surfaced to the page as a Grid<dynamic> because the pivot columns are unknown at coding time. The DataTable of the pivot view is delivered via ViewBag so the Model can be built and fields added dynamically to the grid at init time.
There is no 'columns.Selectable()' as I might expect.
@(Html.Kendo().Grid<dynamic>()
.Name(
"master"
)
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
var
id = ViewBag.TestGridDataTable.PrimaryKey[0].ColumnName;
model.Id(id);
foreach (System.Data.DataColumn column
in
ViewBag.TestGridDataTable.Columns)
{
model.Field(column.ColumnName, column.DataType).Editable(
false
)
;
}
})
.Read(read => read.Action(
"Read"
,
"Results"
))
)
.Columns(columns =>
{
columns.Selectable(); // <----- does not add a check box column
foreach (System.Data.DataColumn column
in
ViewBag.TestGridDataTable.Columns)
{
columns.Bound(cn);
}
})
Do I have to create a new version of the model with an extra boolean field and go from there ?