美文网首页
datagrid editor自定义textarea

datagrid editor自定义textarea

作者: 李连民 | 来源:发表于2018-05-08 11:20 被阅读0次

$.extend($.fn.datagrid.defaults.editors, {
textarea: {
init: function(container, options){
var input = $('<textarea class="datagrid-editable-input" style="height: 80px;" rows='+options.rows+'></textarea>').appendTo(container);
return input;
},
getValue: function(target){
return $(target).val();
},
setValue: function(target, value){
$(target).val(value);
},
resize: function(target, width){
var input = $(target);
if ($.boxModel == true){
input.width(width - (input.outerWidth() - input.width()));
} else {
input.width(width);
}
}
}
});

相关文章

网友评论

      本文标题:datagrid editor自定义textarea

      本文链接:https://www.haomeiwen.com/subject/frpirftx.html