I have a telerik :RadGrid in my project with a Master, Detail configuration. Both Master and Detail tables are have EditMode='Batch'
I need to dynamically set some columns to readonly on a per row basis. I used BatchEditOpening() to acheive this by setting args._cancel to true on the columns that need to be read only. There is more logic to determine the editability than in the example but the end result is the same: setting args._cancel = true if the field needs to be not editable.
To replicate the issue:
click the built in 'Add new record' button 3 times. 3 rows are created as expected.
Then click any where in any of those rows, which should open the row for edit which it does. An error in the telerik function _openCellinEditMode()
It calls this function for the cells that were set to args._cancel = true in the BatchEditOpeining function. The _openCellinEditMode function fails when the following line is executed if (o && $telerik.getElementByClassName(o.cell, e).style.display === "") because there is no element with the rgBatchContainer class that it is looking for because this cell is no longer editable.
Is anyone aware of this issue? and is there a workaround / fix for it?
If I take the code out of the BatchEditOpening function, the error does not occur. It also doesnt occur as each row is added. I have stepped through the code and for each new row added it only calls _openCellinEditMode() for the appropriate editable columns. Then when you click on a cell to edit it will fail by calling the function for a column that has edit cancelled.