EasyUI Forum
May 14, 2024, 01:40:20 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: [SOLVED]How to hide row in treegrid  (Read 3158 times)
aiit
Newbie
*
Posts: 12


View Profile Email
« on: October 29, 2019, 01:01:32 AM »

tree:
Code:
$('#tt').tree('getChildren').forEach(x => {
    var n = $(x.target);
    if (x.text.match('A'))
        n.hide();
    else
        n.show();
});

treegrid:

$('#tg').treegrid('getChildren').forEach(x => {
    var n = Huh Huh
    if (x.text.match('A'))
        n.hide();
    else
        n.show();
});
« Last Edit: October 31, 2019, 05:38:04 AM by aiit » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 29, 2019, 07:59:25 PM »

Please try this code to hide a row.
Code:
var target = this;
var finder = $(target).treegrid('options').finder;
$(target).treegrid('getChildren').forEach(function(row){
if (row.id==21){
finder.getTr(target,row.id).hide()
}
})
Logged
aiit
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: October 31, 2019, 05:36:23 AM »

thank you very much Cheesy
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!