EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: patana on October 09, 2013, 09:16:12 PM



Title: Expand all rows in datagrid-detailview
Post by: patana on October 09, 2013, 09:16:12 PM
By using datagrid-detailview, user must click on + to expand each row.
Does it has anyway/trigger to expand all rows?


Title: Re: Expand all rows in datagrid-detailview
Post by: stworthy on October 09, 2013, 11:29:39 PM
Call 'expandRow' method to expand a specified row. Call 'expandRow' method on all rows to expand all row details.


Title: Re: Expand all rows in datagrid-detailview
Post by: patana on October 10, 2013, 01:48:40 AM
can you show the example code/event to expand all rows?


Title: Re: Expand all rows in datagrid-detailview
Post by: stworthy on October 10, 2013, 02:02:02 AM
Try this.
Code:
var dg = $('#dg');
var count = dg.datagrid('getRows').length;
for(var i=0; i<count; i++){
  dg.datagrid('expandRow',i);
}


Title: Re: Expand all rows in datagrid-detailview
Post by: patana on October 10, 2013, 05:46:08 PM
Thanks!!!