This is a migrated thread and some comments may be shown as answers.

Error in EditMode"Batch" when changing row

2 Answers 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 26 Jul 2016, 12:56 PM

Hi,

Using the RadGrid in Batch Editing mode and the EditType is set to row. I forbid edition in some columns with:

function BatchEditOpening(sender, args) {
    var col = args.get_columnUniqueName();
 
    if (isNaN(col.substring(0,1))) {
        args.set_cancel(true);
    }
}

It works, but when I want to jump in another row, I am getting the following error:"The property "style" of an undefined or zero reference can not be retrieved." (I translate the error). When I comment this code, it work.

What am I doing wrong?

Thanks!

 

2 Answers, 1 is accepted

Sort by
0
Sébastien
Top achievements
Rank 1
answered on 27 Jul 2016, 12:52 PM

EDIT: By removing this code and adding "Readonly = true" to the columns, it work. But the problem is that these columns are no longer available in properties "OldValues" and "NewValues".

I need to access these columns too.

What is the issue here?

 

0
Sébastien
Top achievements
Rank 1
answered on 28 Jul 2016, 06:52 AM
The solution I found is to add the column in DataKeyNames collection of the MasterTableView. So the key/value is available again.
Tags
Grid
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Sébastien
Top achievements
Rank 1
Share this question
or