EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: glarsen on May 04, 2018, 07:41:02 AM



Title: Validate combobox validation with inline datagrid
Post by: glarsen 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          
          }


Title: Re: Validate combobox validation with inline datagrid
Post by: stworthy on May 05, 2018, 06:03:35 PM
Please describe your question in more detail.