EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jaimi on August 16, 2017, 10:35:20 PM



Title: datagrid - multisort
Post by: jaimi 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'
...


Title: Re: datagrid - multisort
Post by: stworthy 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.


Title: Re: datagrid - multisort
Post by: jaimi on August 24, 2017, 12:45:38 AM
but can do a remote sort AND use multisort?


Title: Re: datagrid - multisort
Post by: stworthy 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.


Title: Re: datagrid - multisort
Post by: jaimi on August 28, 2017, 12:24:22 AM
Thank you very much. It works. Great.