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

Disable edit in one row

2 Answers 1179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 14 Mar 2013, 04:53 AM
I have grid with in-cell editing enabled for several columns. But I want to disable editing for some rows depending in row data. Is there any possibility to do this easy?
currently I'm doing a hack like this in edit event,

  
edit: function (e) {
              if (e.model.IsNotEditable) {
                  e.container.html(     $('input', e.container).val());
              }
  }

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 14 Mar 2013, 08:29 AM
Hello Kenneth,

You can close currently edited cell when it matches the condition. For example:

edit: function(e) {
 if (e.model.IsNotEditable) {
  //revert edited cell back to `read` mode
  this.closeCell();
 }
}
 

Greetings,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kenneth
Top achievements
Rank 1
answered on 15 Mar 2013, 04:24 AM
Hi Nikolay ,

Thanks ! That's a better solution ..
Tags
Grid
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Kenneth
Top achievements
Rank 1
Share this question
or