EasyUI Forum
September 16, 2025, 11:40:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Changing the View of a Datagrid  (Read 6869 times)
peter900
Newbie
*
Posts: 22


View Profile Email
« 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 26, 2016, 07:47:43 AM »

Please look at this example http://code.reloado.com/efumad/edit#preview. It works fine.
Logged
peter900
Newbie
*
Posts: 22


View Profile Email
« Reply #2 on: June 27, 2016, 02:13:11 AM »

Thanks for the link - yes it works perfectly ! 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!