EasyUI Forum
May 08, 2024, 03:19:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: editor for datagrid  (Read 7291 times)
jaimi
Full Member
***
Posts: 119


View Profile
« 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
 
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 28, 2013, 06:54:26 AM »

Please refer to http://www.jeasyui.com/documentation/datagrid.php#editor
Logged
jaimi
Full Member
***
Posts: 119


View Profile
« Reply #2 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 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);
}
}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!