Disable editing in kendo grid

后端 未结 5 857
臣服心动
臣服心动 2021-01-19 07:26

I am trying make the an editable grid to uneditable depend on conditions.

I have tried in jquery as below

var $grid = &(\"#gridName\").data(\"ken         


        
5条回答
  •  后悔当初
    2021-01-19 08:25

    for(i=0;i<=$("#grid").find("tbody tr").length ; i++)
    { 
      var model = $("#grid").data("kendoGrid").dataSource.at(i);
      if(model)
      {
          model.fields[$("#grid").data("kendoGrid").columns[i].field].editable = false;    
      }
    }

    http://jsfiddle.net/parthiv89/qwtyLmhk/

    I hope this works well..if works then don't forget to vote me..

提交回复
热议问题