I would like to conditionally disable custom command button when a specific value existing in a column field.
@(Html.Kendo().Grid<Swisslog.DC.Entities.AlarmRespond>
()
.Name("alarmRespondGrid")
.Events(e => e.DataBound("commandButtons"))
.Columns(columns =>
{
columns.Bound(c => c.Customer).Title("Customer");
columns.Bound(c => c.CustomerID).Title("Customer #").Sortable(false).Width(100);
columns.Bound(c => c.EquipmentID).Title("Equipment #").Sortable(false).Width(100);
columns.Bound(c => c.AlarmCode).Title("Alarm").Sortable(false).Width(75);
columns.Bound(c => c.AltAlarmDescription).Title("Description").Sortable(false);
columns.Bound(c => c.FirstAlarmDateLocal).Title("Alarm Date").Format("{0:MM/dd/yy hh:mm:ss tt}").Width(175);
columns.Bound(c => c.AlarmCount).Title("Count").Sortable(false).Width(75);
columns.Bound(c => c.AssignedTo).Title("Assigned To").Sortable(false).Width(175);
columns.Command(command => command.Custom("Assign").Click("assignAlarm")).Width(100);
columns.Command(command => command.Custom("Auto Case").Click("showResolveWindow")).Width(100);
columns.Command(command => command.Custom("Manual Case").Click("createSfdcAlarmCase")).Width(100);
})
When c.AssignedTo == "" I would like to disable the Auto Case and Manual Case buttons. It is not clear to me how to accomplish this with a custom command.
Jim