2
votes

I wanna set editable false for some rows (not for all) in kendo grid. How do I do it ? Is there any way to set grid row properties from outside. I will catch rows when the grid row data bound. But I have no idea to set row editable false.

function GridOnDataBound(arg) {
    dataView = this.dataSource.view();
    var grid = $("#grid").data("kendoGrid");

    var rowObjs = grid.tbody[0].rows;

    for (var i = 0; i < dataView.length; i++) {
        var row = rowObjs[i];
        //            row.className = "gridWhiteRow";
        if (dataView[i].AprPrtyKy === 8941) {//low
            //                row.className = "gridGreenRow";
        }
        if (dataView[i].AprPrtyKy === 8940) {//hight
            //                row.className = "gridYellowRow";
        }
        if (dataView[i].AprPrtyKy === 8944) {//urgent
            row.className = "gridRedRow";
        }
        if (dataView[i].AprPrtyKy === 8942) {//normal
            //                row.className = "gridAquaRow";
        }
        if (dataView[i].AprPrtyKy === 8945) {//normal
            //                row.className = "gridPurpleRow";
        }
        if (dataView[i].AprStsKy === 8946) {
            row.className = "gridGreenRow";
        }

    }
}

Please help. thanks ! :)

1
Which edition mode are you using (inline, inrow, popup)? Basically, there is no out-of-the-box way of controlling it but depending on your edition mode there are some simple solutions that might work for you.OnaBai

1 Answers

1
votes

You can use the same approach as the one covered in this code library article to make the rows not clickable (click + stopPropagation).