EasyUI Forum
September 22, 2020, 10:43:11 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: To close combogrid from toolbar  (Read 231 times)
WizPS
Newbie
*
Posts: 43


View Profile
« 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?
Logged
WizPS
Newbie
*
Posts: 43


View Profile
« Reply #1 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 :-)
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!