EasyUI Forum
November 05, 2025, 03:53:11 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: hide functonality in tree grid  (Read 11882 times)
rahul.sanjose
Newbie
*
Posts: 8


View Profile
« on: November 20, 2012, 04:32:19 PM »

Hi,

I am looking for 2 functionality.

1) Hide a column in treegrid
2) Hide the total treegrid

Could someone please give me an example of how I could achieve this?

Thanks,
Rahul
Logged
rahul.sanjose
Newbie
*
Posts: 8


View Profile
« Reply #1 on: November 20, 2012, 05:45:07 PM »

I just implemented the hide column functoinality. Idea is to load the entire table disabling the column that is not needed.

However, I am still struggling with hiding the whole treegrid. Any help will be highly appreciated.

I tried the following 2 options. Both of them didnot work.

1) $('table').hide(); // Just hides the contents of treegrid. How Can I select the whole treegrid object?
2) $('#tt').hide(); //Doesnt work at all

Following is the tree grid table def that I am using.

<table id="tt" title="TreeGrid" class="easyui-treegrid"
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: November 20, 2012, 07:36:42 PM »

Call 'hideColumn' method to hide a column and 'showColumn' to display it again. Just like this:

Code:
$('#tt').treegrid('hideColumn','name');  // hide the name column
$('#tt').treegrid('showColumn','name');  // show the name column

To hide the whole treegrid component, get the outer panel of treegrid first and then hide it.

Code:
$('#tt').treegrid('getPanel').panel('panel').hide();
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!