EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aiit on October 29, 2019, 01:01:32 AM



Title: [SOLVED]How to hide row in treegrid
Post by: aiit 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 = ??? ???
    if (x.text.match('A'))
        n.hide();
    else
        n.show();
});


Title: Re: How to hide row in treegrid
Post by: stworthy 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()
}
})


Title: Re: How to hide row in treegrid
Post by: aiit on October 31, 2019, 05:36:23 AM
thank you very much :D