EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on August 30, 2018, 07:49:37 AM



Title: datagrid + combobox + inList
Post by: rezzonico 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



Title: Re: datagrid + combobox + inList
Post by: stworthy 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
  }
}


Title: Re: datagrid + combobox + inList
Post by: rezzonico on August 30, 2018, 11:35:11 PM
Thanks

Miche