groupBy along with date sorting on dhxCalendar column

Hi,



We are using DhtmlxGridFromTable and one of the columns is :



.



We also have the groupBy implemented on first column i.e.e grid.groupBy(0).



The issue we are facing is that the sorting does not work on this column when groupby is enabled , though it works for all the columns.We tried removing groupby and sorting worked for this column also.



Is there any known issue that sorting on dhxCalendar does not go hand in hand with groupBy.



Thanks,

Tanu


Hello,


the issue wasn’t reproduced locally. Could you please send the complete demo to support@dhtmlx.com where we can recreate the issue.


Attached is the complete demo of the issue that we are facing.The demo shows that a DhtmlxGrid is made out of the table and one of the field is of type dhxCalendar with sorting enabled by default on that  in desc order.It shows two HTML pages :



1) WithoutGroupBy.html : One which does not have the groupBy and we have noticed the following behavior in that :



       a) The desc sorting comes fine at page load.



       b) Subsequent sorting works fine.



2) WithGroupBy.html : One which has the groupBy on first column and we have noticed the following behavior in that :



     a)   The desc sorting comes fine at page load for each group.



    b)   On subsequent sorting , the result does not come as expected.(Please look the seond grouping i.e of G1 , 29/10/2008 comes in the middel in both the asc and desc order)



 



Please let us know if we are missing something. 



Thanks


Hello,


the issue is confirmed and fixed. We’ll send the fix by email.


Thanks Alex,



I would be loking forward the fix . Since, our application is in Production , we would be concerned about the regression a new file can make. It would be great if you please let us know the areas of functionality which we should test extensively.


If you don’t want to make additional testing, you can locate _sortInGroup method in your dhtmlxgrid_group.js and replace it with the following one:


dhtmlXGridObject.prototype._sortInGroup=function(col,type,order){
var b=this._groups_get();
b.reverse();

for (var i=0; i<b.length; i++){
var c=b[i]._cntr._childs; var a={};
for (var j=0; j<c.length; j++){
var cell = this.cells3(c[j],col);
a[c[j].idd]=cell.getDate?cell.getDate():cell.getValue();
}

this._sortCore(col,type,order,a,c);
}
//add|delete|edit|ungroup
this._groups_put(b);
this.setSizes();
this.callEvent(“onGridReconstructed”,[])
}