Hello,
Looking for an easy solution to enable/disable all grid rows based on other values/selections on the page.
The following selectable parameters for the grid gives me exactly what I need but I need to be able to configure the grid based on the user's input values on the page.
.Columns(columns => {
columns.Bound(e => e.Id).Hidden();
columns.Select()
.Width("20px");
columns.Bound(e => e.Name)
.Title("Name")
.Width("400px");
columns.Bound(c => c.Description)
.Title("Description")
.Width("400px");
})
.Selectable(select => select
.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row)
)
I've tried using the following jquery to toggle the rows, with no luck. 'enabled' is the parameter passed to the function.
var grid = $('#grid').data('kendoGrid');
grid.items().each(
function (index, value) {
$(value).find('.k-checkbox').attr('disabled', !enabled);
}
);
Any suggestions on how I can achieve the functionality needed with the grid component?
Thanks.
Jason