onBeforeEdit: function (row) { let options = $(this).treegrid('options'); options.tempeditor = options.tempeditor || {}; let getColumnOption = $(this).treegrid('getColumnOption', 'sampleTypeId'); if (!options.tempeditor["sampleTypeId"]) { options.tempeditor["sampleTypeId"] = getColumnOption.editor; } if (row.parentId) { getColumnOption.editor = undefined; } else { getColumnOption.editor = options.tempeditor["sampleTypeId"]; } }
本文介绍了一种在树状表格中优化编辑器的方法,通过动态调整样本类型ID列的编辑器实现对不同层级行的编辑控制。此方法在有父子关系的行中禁用编辑器,而在顶级行中保持其功能,提高了数据输入的准确性和效率。
1442

被折叠的 条评论
为什么被折叠?



