EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: WizPS on August 05, 2020, 05:10:42 AM



Title: To close combogrid from toolbar
Post by: WizPS on August 05, 2020, 05:10:42 AM
I want to close my combogrid from a toolbar button (x). I found a way doing this by putting css('display', 'none'). However this way it's not possible to reopen combogrid without having the dropdown recreated.

Code:
, toolbar: [{ iconCls: 'menu-small' }, { text: "<div id='abc'>abc</div>" }, {
                        text: "x", onClick: function () {
                           var el = $(this).closest('.combo-p');
                           el.css('display', 'none');
                        }
                     }]

Any suggestions?


Title: Re: To close combogrid from toolbar
Post by: WizPS on August 05, 2020, 07:00:05 AM
I just managed with the flowing code:
Code:
, toolbar: [{ iconCls: 'menu-small' }, { text: "<div id='abc'>abc</div>" }, {
                        text: "x", onClick: function () {
                           var panel = $(this).closest('.combo-panel');
                           panel.panel("close");
                        }
                     }]
 
Thanks and my apologies if disturbing :-)