Easyui datagrid动态设置列,单元格不可编辑


列不可编辑
//注意要在开启行编辑之**前**完成设置editor为空的操作
var ee = $('#FYDetailGrid').datagrid('getColumnOption', 'oneUpVal');
ee.editor={};
单元格不可编辑
//注意要在开启行编辑之**后**设置该单元格不可用
var ff = $('#FYDetailGrid').datagrid('getEditor', { index:editIndex, field: 'oneUpVal' });
$(ff.target).attr('disabled', true);
//或者
$(ff.target).attr('disabled','disable');

要注意行编辑开启以后再设置单元格不可编辑,否则无效。

原文地址:https://blog.csdn.net/weixin_42717849/article/details/87462563

EasyUI DataGrid可编辑单元格

//当用户点击一行的时候,我们开始一个编辑动作

$('#dg').datagrid({   
    onClickCell: function(index,field,value){
        $(this).datagrid('beginEdit', index);
        var ed = $(this).datagrid('getEditor', {index:index,field:field});
    } 
});

原文地址:https://www.cnblogs.com/huangf714/p/5898913.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM