I'd like to create a grid based on a ViewModel type like you normally would:
@(Html.Kendo().Grid<
BlockoutPeriodVM
>()
.Name("BlockoutWeeks")
.Columns(columns =>
{
columns.Bound(b => b.Name).Title("Name");
columns.Bound(b => b.StartDate).Title("Start Date").Format("{0:d}");
columns.Bound(b => b.EndDate).Title("End Date").Format("{0:d}");
columns.Template(@<
text
>[buttons]</
text
>).Title("Edit").ClientTemplate(@"#= crm.setup_classSchedule_edit.getBlockoutCommandTemplate(data) #");
})
)
but I want to manage the data that it is bound to myself, on the client-side. In my script, I will deserialize an array of BlockoutPeriodVMs and would then like to set that array as the datasource of the grid. I will also offer CRUD support for this array outside of the grid so I'm hoping the Grid/datasource can make the array an observable array and update according to any changes I make. I found this old thread asking the same thing for jQuery Kendo UI, but is there a way to set the read action to a function like that using the MVC Html helper?