EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: crosemffet on December 08, 2015, 07:32:09 AM



Title: DataGrid DetailView only specifics rows
Post by: crosemffet on December 08, 2015, 07:32:09 AM
hello, and thanks for your support,
the situation is: I have one datagrid with 10 rows. I want the + sign shows only in certain rows that can be expanded, i.e. rows 4 and 6.
the other rows can't be expanded because no data to expand.
how can I avoid to shot the + sign in the expand column in the rows 1, 2, 3.....?
thanks in advance,


Title: Re: DataGrid DetailView only specifics rows
Post by: stworthy on December 08, 2015, 08:30:14 AM
You can hide the expanding icons on any rows. Please refer to the code below:
Code:
$('#dg').datagrid({
    onLoadSuccess: function(){
        var dg = $(this);
        $.map([1,2,3], function(index){
            dg.datagrid('getExpander', index).hide();
        })
    }
});