//重写textarea
.
e
x
t
e
n
d
(
.extend(
.extend(.fn.datagrid.defaults.editors,{
textarea: {
init: function(container, options){
var input = $("").validatebox(options).appendTo(container);
return input;
},
getValue: function(target){
return $(target).val();
},
setValue: function(target, value){
$(target).val(value);
},
resize: function(target, width){
var input =
(
t
a
r
g
e
t
)
;
i
f
(
(target); if(
(target);if(.boxModel == true){
input.width(width - (input.outerWidth() - input.width()));
}else{
input.width(width);
}
}
}
});
{field:‘kpiRemark’,align:‘center’,title:‘描述信息’,width:220,hidden: false,
editor:{type:‘textarea’},
styler: function(value,row,index){
return ‘overflow: hidden;text-overflow: ellipsis;white-space: nowrap;’;
}
}