EasyUI Forum
October 10, 2024, 10:45:54 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 3107 times)
WizPS
Jr. Member
**
Posts: 67


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
Jr. Member
**
Posts: 67


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!