Hi all,
I've struggled a couple of days with this - pretty much every example I've found just doesn't work for me or is for React/Angular etc.
I have a grid that is grouped and has a checkbox on one of them (actually it isn't grouped by default)
@(Html.Kendo().Grid<MyProject.Models.Schedule.StoredProcResults.EventSchedule>()
.Name("schedule")
.Columns(columns =>
{
columns.Select().Width(50);
columns.Bound(s => s.Store);
columns.Bound(s => s.State);
columns.Bound(p => p.Region).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.District).Filterable(ftb => ftb.Multi(true));
//columns.Bound(p => p.VehicleTypeName).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.SupplierNumber).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.OrderGroup).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.SupplierName).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.OrderSupplier).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.DeliverySupplier).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.OrdersWithPattern).Filterable(ftb => ftb.Multi(true));
columns.Bound(p => p.DeliversWithPattern).Filterable(ftb => ftb.Multi(true)).ClientGroupHeaderColumnTemplate(
" <input type='checkbox' class='checkbox select-group'></input> Delivery Pattern"
);
})
.Sortable()
.PersistSelection()
.Scrollable(s => s.Height("465px"))
.Groupable()
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Multiple)
)
.Filterable()
.HtmlAttributes(new { style = "height:600px;" })
.Resizable(r => r.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GetEventSchedule", "Schedule"))
.Group(groups => groups.Add(p => p.VehicleTypeName))
)
)
When the checkbox on DeliveryPattern is checked, I'd like all items grouped under it, to be checked. When it's unchecked, uncheck all in the group.
Also, if someone can give me the syntax for grouping two fields by default, that'd be helpful
Finally, I'd like to add a button that goes to the next part of my page, and that would tell me every selected checkbox in the grid.
Can someone help me with this please?