coffee script 中 dojox grid thiscellgridcolumnittoLocationIdx_cellWidgetsthiscellrowidwidget 禁用输入框
在 CoffeeScript 中禁用 DojoX Grid 中的输入框,可以使用以下代码:
# 获取需要禁用输入框的单元格
cell = @cell
# 获取单元格所在列的 index
colIndex = cell.grid.column(cell.cellIndex).index()
# 获取单元格对应的 widget
widget = cell.grid.column(colIndex)._cellWidgets[cell.row.id].widget
# 禁用输入框
widget.set('disabled', true)
以上代码将获取当前单元格的信息,包括所在列的 index、对应的 widget,然后将 widget 的 disabled 属性设置为 true,从而禁用输入框。
原文地址: https://www.cveoy.top/t/topic/fEwU 著作权归作者所有。请勿转载和采集!