EasyUI Forum
March 29, 2024, 12:43:30 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: datagrid - multisort  (Read 8226 times)
jaimi
Full Member
***
Posts: 119


View Profile
« on: August 16, 2017, 10:35:20 PM »

I set the property multisort to true. within the column header appear the arrow to show which columns are sorted. But it still sorts only the first selected column.
Why is that?

What i found out is that if i set the remoteSort Property to false it does the multiSort but only with the visible page of the datagrid. Not with the whole data-set which is selected. so if I have 3 pages of data it then sorts only the actual selected one.
How to deal with that?

...
 ]]//columns
  ,toolbar     : '#tobAusbilder'
  ,url         : 'partner.act.php?frm=frmPFA&act=T&for=' + vFOR
  //,saveUrl     :
  //,updateUrl   : 'partner.act.php?frm=frmPFA&act=U'
  //,destroyUrl  : 'partner.act.php?frm=frmPFA&act=D'
  ,remoteSort  : 'true'
  ,multiSort   : 'true'
  ,idField     : 'OLT20A009T_KEY'
  ,queryParams : {sort: 'PFA_NAME'}
  ,rownumbers  : false
  ,autoSave    : 'false'
  ,singleSelect: 'true'
  ,pagination  : 'true'
  ,pageSize    : 30
  ,pageList    : [20,30,40,50]
  ,pagePosition: 'top'
...
« Last Edit: August 16, 2017, 10:44:08 PM by jaimi » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 17, 2017, 08:28:57 AM »

If you set the 'remoteSort' to false, the datagrid will do sorting on local data. i.e. the current loaded page. To sort on your whole rows, you have to set the 'remoteSort' to true and do sorting on your server side.
Logged
jaimi
Full Member
***
Posts: 119


View Profile
« Reply #2 on: August 24, 2017, 12:45:38 AM »

but can do a remote sort AND use multisort?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 25, 2017, 04:27:23 PM »

No problem, the 'sortName' and 'sortOrder' parameters will be sent to server. You should retrieve theme, sort your data and return the sorted data base to the browser.
Logged
jaimi
Full Member
***
Posts: 119


View Profile
« Reply #4 on: August 28, 2017, 12:24:22 AM »

Thank you very much. It works. Great.
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!