EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on September 12, 2014, 07:17:25 AM



Title: Is it possible to make the default groupView not expanded?
Post by: aswzen on September 12, 2014, 07:17:25 AM
Is it possible to make the groupView not expanded as default?
or how to make the groupView collapsed as default.?

Thanks in advance


Title: Re: Is it possible to make the default groupView not expanded?
Post by: stworthy on September 12, 2014, 07:49:18 AM
Please call 'collapseGroup' method on all groups when loaded data successfully.
Code:
$('#dg').datagrid({
onLoadSuccess:function(){
var gcount = $(this).datagrid('options').view.groups.length;
for(var i=0; i<gcount; i++){
$(this).datagrid('collapseGroup', i);
}
}
})


Title: Re: Is it possible to make the default groupView not expanded?
Post by: aswzen on September 14, 2014, 07:48:08 PM
wow its works...  :) thank you

i hope you to make the documentation about that one...


Title: Re: Is it possible to make the default groupView not expanded?
Post by: xtrenge on April 23, 2015, 03:15:35 PM
Please call 'collapseGroup' method on all groups when loaded data successfully.
Code:
$('#dg').datagrid({
onLoadSuccess:function(){
var gcount = $(this).datagrid('options').view.groups.length;
for(var i=0; i<gcount; i++){
$(this).datagrid('collapseGroup', i);
}
}
})

Soooo helpful !! thnx !