I have a RadGrid
with EditMode
set to Batch
. I want to disable column editing on certain conditions like for condition "A" I need editing enabled and for condition "B" I need to disable editing.
I used java-script:
In RadGrid you just add code:
<ClientSettings ...
<ClientEvents OnRowClick="OnRowClick" />
...>
In JavaScript:
function OnRowClick(sender, eventArgs) {
var RowID = eventArgs.get_id(); //get Row
var masterTable = $find("<%=rdGrid.ClientID%>").get_masterTableView(); //get Grid
var ControlX = masterTable.get_dataItems()[RowID].findElement('ControlX').id; //get Control ID
//check conditions then disable or enable...
$(ControlX).prop('disabled', false); //Get Control and Disable the editing
...
}