Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Babu on Aug 12, 2008 07:32
open dhtmlx forum
Grid Sorting

I want to sort all the records by the date column field after I load the grid with all the records.
But if I change the mygrid.setSorting(date,na,na) in the follwing piece of code, the grid content is getting distorted in an unusual fashion.Here I am using setRowspan to merge two records which are to the same date.

<script>        
        mygrid = new dhtmlXGridObject('gridbox');
        mygrid.selMultiRows = true;
        mygrid.imgURL = "<%=appName%>/images/";
        mygrid.setHeader('Date,Start Time,End Time');                
        mygrid.setInitWidthsP("7,5,5");
        mygrid.setSkin("light");                                                                         
        mygrid.setColAlign("center,center,center");                
        mygrid.setColSorting("date,na,na");
        mygrid.setColTypes("ro,ro,ro");        
        mygrid.enableAutoHeigth(true);
        mygrid.enableColumnAutoSize(false);                                
        mygrid.init();
        
        mygrid.addRow(1,['08/05/2008','9:00 AM','12:00 PM'],1);
        mygrid.addRow(2,['','12:00 PM','4:00 PM'],2);
        mygrid.setRowspan(1,0,2);
        mygrid.addRow(3,['08/07/2008','10:00 AM','11:00 AM'],3);
        mygrid.addRow(4,['','11:00 AM','4:00 PM'],4);
        mygrid.setRowspan(3,0,2);
        mygrid.addRow(5,['08/01/2008','8:00 AM','1:00 PM'],5);
        mygrid.addRow(6,['','1:00 PM','5:00 PM'],6);
        mygrid.setRowspan(5,0,2);
    </script>

Please help me through this.
Answer posted by Support on Aug 12, 2008 08:07
There is known issue with sorting grid in rowspan - please contact us directly at support@dhtmlx.com if you need the fix ASAP.