EasyUI Forum
May 04, 2024, 01:14:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: eDatagrid: How to enable sorting on any column header that is clicked?  (Read 3699 times)
simplescience
Newbie
*
Posts: 4


View Profile Email
« on: June 04, 2015, 06:02:41 PM »

I created an edatagrid and it seems to be working.  We would like to sort the grid based on clicking a header name.  I see that if I add the "sortable:true" to the "Columns" array, I can click each header, and the asc, desc and reset options work.. but no sorting occurs.  Also.. when I add the Columns array, I cannot edit any of the rows.

Is there something I've missed?

Thanks...
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: June 04, 2015, 06:55:37 PM »

Please set the 'remoteSort' property to false.
Code:
$('#dg').datagrid({
  remoteSort:false
});

If you want to use the remote sorting, you have to do the sorting in your server side and then return the sorted data back to the browser.
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!