EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: peter900 on June 25, 2016, 03:46:57 AM



Title: Changing the View of a Datagrid
Post by: peter900 on June 25, 2016, 03:46:57 AM
Is there any way to change from a detailview to a groupview in a Datagrid using a button - as you can do to change the records displayed.

For example the code code below does not give an error and changes the server data source, but it does not show any grouping.

Code:
function group () {
alert("Grouped");
$('#dg').datagrid({
url:'get_users_filtered.php',
view: groupview,
groupField: firstname,
groupFormatter:function(value,rows){
return value + ' - ' + rows.length + ' Items';
}
});


}

What am I doing wrong ?  Thanks.


Title: Re: Changing the View of a Datagrid
Post by: stworthy on June 26, 2016, 07:47:43 AM
Please look at this example http://code.reloado.com/efumad/edit#preview. It works fine.


Title: Re: Changing the View of a Datagrid
Post by: peter900 on June 27, 2016, 02:13:11 AM
Thanks for the link - yes it works perfectly !