EasyUI Forum
May 05, 2024, 06:22:09 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: menus from filter isnt destroyed when reloading the datagrid  (Read 7100 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: November 08, 2014, 09:02:21 AM »

Hey,
When making changes to the datagrid that requires it to reload like changing the columns,
the menus that are created from the filter button isn't destroyed. what I mean is this,
This is the how the datagrids dom looks when first time loaded:


After playing a bit with the datagrid with this code and then creating the filters again:
Code:
dg.datagrid({columns: newColumns});

This is how it will look now:


Is there a way to destroy the menus of this datagrid when reloading it?
at some point I looked at the dom and there was around 30 menus.

Thanks.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: November 08, 2014, 07:10:12 PM »

Please call 'disableFilter' method before recreating the datagrid. Be sure to download the newest 'datagrid-filter.js' file from http://www.jeasyui.com/extension/datagrid_filter.php
Code:
dg.datagrid('disableFilter');
dg.datagrid({columns: newColumns}).datagrid('enableFilter',...);
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #2 on: November 09, 2014, 05:16:48 PM »

Thanks!
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!