EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on June 12, 2016, 07:14:05 PM



Title: Remote ComboGrid Trigger on Set Value
Post by: arma on June 12, 2016, 07:14:05 PM
Hi,

I have an empty remote combogrid and when typing some it could load remote data and match perfectly.
But if i setValue() programatically, combogrid does not send 'q' parameter just like when typing manually.

It only show id as a result of setValue(), not the textfield.

How to trigger it when doing setValue ?

Thanks.


Title: Re: Remote ComboGrid Trigger on Set Value
Post by: jarry on June 13, 2016, 08:27:23 AM
Please try this code.
Code:
var cc = $('#cc');
cc.combogrid('setValue','q');
cc.combogrid('options').keyHandler.query.call(cc[0],'q');


Title: Re: Remote ComboGrid Trigger on Set Value
Post by: arma on June 13, 2016, 06:46:44 PM
Thank you so much jarry, it works good.

Will it be fine if it becomes combogrid method for simplificatition ?

Code:
$('#cc').combogrid('setValue','q').combogrid('query');