This question is locked. New answers and comments are not allowed.
I have a master / detail grid, I want to hide the 'Add new record' based when some condition occurs on master column
(say master column [Remarks] == 'done' etc).
I would also like to disable the edit and save on the detail grid if the Insert button is disabled
code in my detail grid
...//omitted the code
.DetailView(details => details.ClientTemplate(
Html.Telerik().Grid<PurchaseOrderDetail>()
.Name("DetailsPO_<#= PurchaseOrderID #>")
.ToolBar(tb => {
//if ("") tb.Insert();
tb.Insert();<<<<<<<<<<<<<<< Disable this depends on the master column value
})
.
.
.
if (1 == 1) <<<<<<<<<<<<<<Condition HERE
{
columns.Command(command =>
{
command.Edit().ButtonType(GridButtonType.Image);
command.Delete().ButtonType(GridButtonType.Image);
}).Title("Commands").Width(100);
}
Thanks
(say master column [Remarks] == 'done' etc).
I would also like to disable the edit and save on the detail grid if the Insert button is disabled
code in my detail grid
...//omitted the code
.DetailView(details => details.ClientTemplate(
Html.Telerik().Grid<PurchaseOrderDetail>()
.Name("DetailsPO_<#= PurchaseOrderID #>")
.ToolBar(tb => {
//if ("") tb.Insert();
tb.Insert();<<<<<<<<<<<<<<< Disable this depends on the master column value
})
.
.
.
if (1 == 1) <<<<<<<<<<<<<<Condition HERE
{
columns.Command(command =>
{
command.Edit().ButtonType(GridButtonType.Image);
command.Delete().ButtonType(GridButtonType.Image);
}).Title("Commands").Width(100);
}
Thanks