我在这里增加一个Datagrid中编辑器(text,textarea,checkbox,numberbox,validatebox,datebox,combobox,combotree.
)没有的编辑;增加一个DateTimeBox
- $.extend($.fn.datagrid.defaults.editors, {
- text: {
- init: function(container, options){
- var box= $('<input />').appendTo(container);
- box.editable=false;
- box.datatimebox(options);
- return box;
- },
- getValue: function(target){
- return $(target).datatimebox('getValue');
- },
- setValue: function(target, value){
- $(target).datatimebox('setValue',value);
- },
- resize: function(target, width){
- $(target).datatimebox('resize',width);
- },
- {
- destroy:function(target){
- $(target).datatimebox('destroy');
- }
- }
- }
- });