I've been told this has been implemented in SC8 but cannot find it anywhere in the documentation. Can someone please point me to it? Thanks.
Announcement
Collapse
No announcement yet.
X
-
I am having some problems with the canMultiSort. Perhaps I am understanding the feature wrong.
I have a listgrid in which the data source is server-side. I can initialize the sort columns fine (as in, the data is shown sorting by one column then the other). My problem now is if I try to add another column to sort with by using shift-click, what ends up happening is the other two sorts initialized have been cleared and the data is now only being sorted with that column I clicked on.
I've tried using the same list grid example with the feature explorer by using the countryList sample data and it works fine. My question is, does sorting still require sorting on the server side? I read somewhere that if the data becomes small enough (which in my case 4 rows should be small enough) that the grid will do client-side sorting.
Also, if I try removing the data property of the listgrid to just show an empty grid, then I can click on each column header as if I were adding it to the list of sort columns (the sort arrow as well as the sort column # appears on the column header).
If you could clear this up for me ASAP, that would be great.
Comment
-
Multi-level sorting does require server-side sort capability if the dataset could ever require paging. Multi-level sort will take place on the client side if the cache is complete, so you can have a DataSource that doesn't implement server-side multi-sort yet still supports the feature if you never use paging.
The DataSource advertises whether it supports multi-level sort via DataSource.canMultiSort, which defaults to true.
It's not clear how you could get the behavior you're seeing, so please try to isolate differences relative to the sample.
Comment
-
Not exactly sure how else to debug this. Maybe you can see something with the code I am using.
Code:isc.VLayout.create({ID:"cwvLayouttable",width:"100%",height:"100%",members: [(isc.DataSource.create({ID:"table$ds",fields: [{name:"cwPK__",primaryKey:true}],canMultiSort:false,showPrompt:false}), isc.ListGrid.create({title:" ",$cwShowDetailColumn:true,canMultiSort:true, initialSort: [{property:"manager",direction:"ascending"},{property:"userId",direction:"descending"}], fastCellUpdates:false,dataSource:"table$ds",ID:"table",hoverStyle:"CwHoverStyle",modalEditing:true,recordBaseStyleProperty:"velocityRowStyle",canSelectText:true,selectOnEdit:true,willHandleErrors:true,autoFetchData:true,canSort:true,selectionProperty:"$isCwSelected",width:"100%",height:"100%", fields:[ {type:"image",showTitle:false,width:15,imageWidth:10,imageHeight:10,getCellValue:function() { return '/cwf/r/cwfv/bullet_triangle_glass_blue.png'; },$cwCellClickMethod:"showDetailAction",name:"_cwShowDetailColumn",align:"left",canEdit:false,validateOnChange:true}, {title:"<nobr>User ID <\/nobr>",editorType:"text",name:"userId",align:"left",validateOnChange:true,width:"210"}, {title:"<nobr>Active <\/nobr>",type:"boolean",cwToggleEdit:"false",editorType:"checkbox",name:"active",align:"left",validateOnChange:true,width:"100"}, {title:"<nobr>Manager <\/nobr>",type:"boolean",cwToggleEdit:"false",editorType:"checkbox",name:"manager",align:"left",validateOnChange:true,width:"100"} ]}))]})
Comment
Comment