I’m using custom toolbar buttons on my Telerik mvc grid.
For example:
.ToolBar(toolBar =>
{
toolBar.Custom().Url("#").ButtonType(GridButtonType.Text).Text("send to web service").HtmlAttributes(new {@onclick = "SendReportConfirmationDialog()"});
})
But this control has no .hidden(true) or .enabled(false) property so i’m trying to disable this button with true or false based on certain boolean value.
Do you know if this is possible?
There is no such configuration. You can try to disable it with JavaScript when the Grid is loaded (OnLoad event)
The above will disable all the buttons in the toolbar – to be more specific you can assign class to your command button via the HtmlAttributes method,
And Change the selector:
Dunno if this helps, but I think there is no other way.