【发布时间】:2017-05-10 16:58:08
【问题描述】:
我以编程方式在每个单元格中创建了一个带有文本字段的网格视图,我需要获取文本字段的所有值并保存它们。
这是我的代码:
renderColumn : function(value, meta, record, rowIndex) {
var columnaId = value;
var filaId = record.raw.tipoCuenta.numero;
return '<input type="text" size=18 maxlength=18 style="text-align:right; margin:0px !important; padding:0px !important; font-weight:bold; font-size:10px;" value="'
+ record.get(meta.column.campoValor)
+ '" tabindex="' + tabindex + '" class= "' + columnaId + '_' + filaId + '"></input>'
+'<input type="text" size=5 maxlength=5 style="border : white; text-align:right; margin:0px !important; padding:0px !important; font-size:10px;" value="'
+ record.get(meta.column.campoPorcentaje)
+ '" readonly="readonly" class= "porcentaje">% </input>';
},
这是视图。
我该怎么做?
谢谢。
【问题讨论】:
-
您使用哪个版本的 ExtJS?你的 ExtJS 版本有
widgetcolumn吗? -
是的,我使用 gridPanel。
-
版本是4.0,我查一下,谢谢。
-
如何对所有输入应用一个公共类,然后使用
grid.getView().getEl().query('.input-class-name') -
您好,我用onblur解决了,调用一个设置记录的函数,修改我的服务,非常感谢。
标签: javascript gridview extjs