EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jaimi on December 28, 2013, 02:12:08 AM



Title: editor for datagrid
Post by: jaimi on December 28, 2013, 02:12:08 AM
Hello,
I'd like to learn more about the editors used in datagrids.
I couldn't find a detalied documentation.
Is there an overview over the standard editors and the possible options per editor?
Is thera a tutorial how to create a new editor?

Thanks.
Jaimi
 


Title: Re: editor for datagrid
Post by: stworthy on December 28, 2013, 06:54:26 AM
Please refer to http://www.jeasyui.com/documentation/datagrid.php#editor


Title: Re: editor for datagrid
Post by: jaimi on December 30, 2013, 02:25:42 AM
Thanks, that is what i allready did.
For me (at least) it is not clear.
For example: when i use the textarea, which options are available? Is there an overview?

Thanks.


Title: Re: editor for datagrid
Post by: stworthy on December 30, 2013, 05:16:40 PM
The textarea editor is defined as below, no options required, but you can add any options in 'init' function.

Code:
textarea: {
init: function(container, options){
var input = $('<textarea class="datagrid-editable-input"></textarea>').appendTo(container);
return input;
},
getValue: function(target){
return $(target).val();
},
setValue: function(target, value){
$(target).val(value);
},
resize: function(target, width){
$(target)._outerWidth(width);
}
}