I want to enable the ViewDetails command button only if Type is 1 else disable upon grid load, here is the code that displays the data on the grid, but how to Enable/Disable it?
@( Html.Kendo().Grid<KendoUIMVC.Models.SIListing>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Number).Width(75);
columns.Bound(p => p.Type).Width(50);
columns.Command(command => command.Custom("Accept").Click("AcceptDetails")).Width(60);
columns.Command(command => command.Custom("View").Click("ViewDetails")).Width(60);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.Groupable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("getListing", "Listing"))
)
)
<script type="text/javascript">
function ViewDetails(e) {
}
function AcceptDetails(e) {
}
</script>
^^ can some one help?
@( Html.Kendo().Grid<KendoUIMVC.Models.SIListing>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Number).Width(75);
columns.Bound(p => p.Type).Width(50);
columns.Command(command => command.Custom("Accept").Click("AcceptDetails")).Width(60);
columns.Command(command => command.Custom("View").Click("ViewDetails")).Width(60);
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.Groupable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("getListing", "Listing"))
)
)
<script type="text/javascript">
function ViewDetails(e) {
}
function AcceptDetails(e) {
}
</script>
^^ can some one help?