EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Opan Mustopah on March 24, 2015, 03:12:19 AM



Title: need help with keyHandler properties in combogrid.
Post by: Opan Mustopah on March 24, 2015, 03:12:19 AM
hello again,

i have a problem using keyHandler properties in combogrid.
here is my code:

Code:
 <div class='fourth'>
            <div class='div-form'>
              <label>Route Assignments</label>
              <div>
                <input class="easyui-combogrid mc" data-options="prompt: &#39;Route Assignments&#39;, url: &#39;/nst_lookup/nst_lcg_ra&#39;, mode: &#39;remote&#39;, method: &#39;get&#39;, queryParams:{type:&#39;ra&#39;}, panelWidth: 700, idField: &#39;ra_id&#39;, textField: &#39;ra_id&#39;, tipPosition: &#39;top&#39;, fitColumns:true, keyHandler: {enter: function(e){test();}}, onShowPanel:function(){return rowHeight(this);}, columns: [[{field: &#39;ra_id&#39;, width: 100,sortable:true},{field: &#39;hawb_list&#39;, width: 255,sortable:true},{field: &#39;mvo_ship_id_list&#39;, width: 255,sortable:true},{field: &#39;shipping_invoice_list&#39;, width: 255,sortable:true}]]" id="ra_id" name="m_ra_dr_a[ra_id]" style="width: 100%; height: 30px" type="text" />
              </div>
            </div>
          </div>


and this error occured:

Code:
Uncaught TypeError: Cannot read property 'call' of undefined


is my code wrong?

many thanks for the answer.


Title: Re: need help with keyHandler properties in combogrid.
Post by: stworthy on March 24, 2015, 07:46:09 AM
Please use the code below instead.
Code:
$('#cc').combogrid({
keyHandler: $.extend({}, $.fn.combogrid.defaults.keyHandler, {
enter: function(e){
//...
}
})
})