EasyUI Forum
April 20, 2024, 06:09:42 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: Validate combobox validation with inline datagrid  (Read 3353 times)
glarsen
Newbie
*
Posts: 39


View Profile Email
« on: May 04, 2018, 07:41:02 AM »

Need to validate a combobox selection - (in this case there is a limit on rows with the same selection)

onChange event is capturing new and old values.

I just need to reset the combobox value but not sure how to do that. Thanks for any help:


    $('#userGrid').datagrid({
        fit: true,
        idField:'key',
        singleSelect: true,
        columns:[[
           {field:'licenseType', title:'License', fixed: true, width: 120, sortable:'true',remoteSort:false,multiSort:true,
                formatter:function(value,row){
                    return row.licenseType;
                },
                editor:{
                    type:'combobox',
                    options:{
                        limitToList: true,
                        panelHeight: 60,
                        valueField:'licenseType',
                        textField:'label',
                        method:'get',
                        mode:'local',
                        data: [{
                              label: 'Administrator',
                              licenseType: 'Administrator'
                            },{
                              label: 'Analyst',
                              licenseType: 'Analyst'
                            },{
                              label: 'Author',
                              licenseType: 'Author'
                            }],
                        required:true,
                        onChange:  function(newValue,oldValue){
                          alert(newValue);
         
                          \\ update value here          
          }
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 05, 2018, 06:03:35 PM »

Please describe your question in more detail.
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!