EasyUI Forum
May 21, 2024, 01:21:05 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: datagrid + combobox + inList  (Read 4392 times)
rezzonico
Full Member
***
Posts: 184


View Profile
« on: August 30, 2018, 07:49:37 AM »

Hi all,

in a combobox I limit the possible options to those listed with the following (working) code:

Code:
         $('#Sigla').combobox({
            url: ...,
            validType: 'inList["#Sigla"]'
         });

"inList" is described in the following thread:
http://www.jeasyui.com/forum/index.php?topic=3364.msg7623#msg7623

I want to do the same in a datagrid editor but the following code doesn't work:

Code:
         $('#dg').datagrid({
            columns: [[
               {field:'Sigla',
                   editor: {
                      type: 'combobox',
                      options: {
                         url: ...,
                         validType: 'inList["#Sigla"]'
                      }
                   }
               }
           ]]
         });

Thanks for any help.
Miche

« Last Edit: August 30, 2018, 07:54:51 AM by rezzonico » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 30, 2018, 05:49:18 PM »

Please apply the 'limitToList' property to true.
Code:
editor: {
  type: 'combobox',
  options: {
     url: ...,
     limitToList: true,
     reversed: true
  }
}
Logged
rezzonico
Full Member
***
Posts: 184


View Profile
« Reply #2 on: August 30, 2018, 11:35:11 PM »

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!