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

Disable edit for the particular column on Edit

4 Answers 335 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Muthu
Top achievements
Rank 1
Muthu asked on 03 Oct 2012, 11:44 AM
Hi i want to enable or disable editing for specified column when editing row in grid.
i can achieve this using telerik like this
var indexCell = $(e.cell).index();
            var grid = $('#' + e.currentTarget.id).data('tGrid');
            if (grid.columns[indexCell].title == "*Country<br>Code" && e.mode == "edit") {
                grid.cancelCell(e.cell);
            }

Thanks
 

4 Answers, 1 is accepted

Sort by
0
Muthu
Top achievements
Rank 1
answered on 04 Oct 2012, 04:43 AM
i done this .thanks
0
Jamie
Top achievements
Rank 1
answered on 07 Nov 2012, 05:39 PM
I'd like to know the answer for this one. 
0
Muthu
Top achievements
Rank 1
answered on 09 Nov 2012, 04:31 AM
function onEdit(e) {
            var indexCell = e.container.context.cellIndex;
            var grid = $('#Grid').data('kendoGrid');

            if (!e.model.isNew()) { // when Editing
                if (indexCell != 'undefined' && grid.columns[indexCell].title == "titleofthecolumn") {
                      $('#Grid').data("kendoGrid").closeCell();
                }
            }
        }
0
Victor
Top achievements
Rank 1
answered on 20 Nov 2012, 02:13 PM
Friend you can share complete code for understand please.

Thanks.
Tags
Grid
Asked by
Muthu
Top achievements
Rank 1
Answers by
Muthu
Top achievements
Rank 1
Jamie
Top achievements
Rank 1
Victor
Top achievements
Rank 1
Share this question
or