EasyUI Forum
April 28, 2024, 01:44:47 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: Why Does columnMoving not work along with enableFilter feature  (Read 4417 times)
Darrel
Jr. Member
**
Posts: 74


View Profile
« on: November 27, 2016, 11:48:23 PM »

In  my case i am not able to use the columnMoving feature  along with the enableFilter feature Why is this so? My Source Code is as follows : -

$("#RESULT_TABLE"+i).datagrid({
         columns: colData,
         data: rowData,
         singleSelect:true,
         sortable:true,
         multiSort: true,
         remoteSort: false,
         height:'auto',
         pagination:true,
         striped: true,
         rownumbers: true,
         idField:'col0',
         selectOnCheck: false,
         checkOnSelect: false,
         onCheck:onCheck,
         onUncheck:onUncheck,
         onCheckAll: function(){
            checkAll_Rows(this);
         },
         onUncheckAll: function(){
            UncheckAll_Rows(this);
         },
      });   
   }
   //$("#RESULT_TABLE" + i).datagrid('loaded');
   $("#RESULT_TABLE" + i).datagrid('clientPaging');

   
   

//DataGrid - show required columns start
   

   $("#RESULT_TABLE" + i).datagrid({onHeaderContextMenu: function(e, field){
         e.preventDefault();
         if (!cmenu){
            createColumnMenu("#RESULT_TABLE" + i);
         }
         cmenu.menu('show', {
            left:e.pageX,
            top:e.pageY
         });
      }
   });
//DataGrid - show required columns end

   $("#RESULT_TABLE" + i).datagrid('columnMoving');

//DataGrid - enable filter
   $("#RESULT_TABLE" + i).datagrid('enableFilter');
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: November 28, 2016, 02:23:14 AM »

Please try this code:
Code:
var dg = $('#dg').datagrid({
    onBeforeDropColumn: function(){
        $(this).datagrid('disableFilter');
    },
    onDropColumn: function(){
        $(this).datagrid('enableFilter');
        $(this).datagrid('doFilter');
    }
});
dg.datagrid('enableFilter');
dg.datagrid('columnMoving');
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!