EasyUI Forum
May 04, 2024, 12:47:57 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datagrid - change editor dinamically  (Read 4931 times)
rezzonico
Full Member
***
Posts: 183


View Profile
« on: February 01, 2018, 08:43:42 AM »

Hi all,

in a datagrid I need to change the editor dinamically.

Here is my code:
http://195.144.40.170/jeasyui/AAA2/index.html

Please, select a row and change the value in the column "Editor Type".
Then select the same row.
You will see that the editor of the column "Value" has been changed according to the selected value.
It works but in the console.log I see an error.

Any help to solve this problem is appreciated.

Regards.
Miche
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 01, 2018, 07:07:19 PM »

Please try this code instead.
Code:
{field:'Type',title:'Editor Type',width:100,formatter:formatType,
   editor: {
      type: 'combobox',
      options: {
         onChange: function() {
          if(editIndex){
          setTimeout(function(){
          endEditing();
          },0)
          }
         },
...
Logged
rezzonico
Full Member
***
Posts: 183


View Profile
« Reply #2 on: February 02, 2018, 03:27:02 AM »

It works !

Thanks
Miche
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!