Hi, dhtmlxgrid can’t sort a column when the column type is set to dhxCalendar and grid.splitAt is invoked. can someone help me, thanks.
the source code bellow
<link rel="STYLESHEET" type="text/css" href="./codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="./codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<link rel="STYLESHEET" type="text/css" href="http://localhost:9080/webtest/dhtmlxGrid/dhtmlxCalendar/codebase/dhtmlxcalendar.css">
<script src="./codebase/dhtmlxcommon.js"></script>
<script src="./codebase/dhtmlxgrid.js"></script>
<script src="./codebase/dhtmlxgridcell.js"></script>
<script src="http://localhost:9080/webtest/dhtmlxGrid/dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script>
<link rel="STYLESHEET" type="text/css" href="http://localhost:9080/webtest/dhtmlxGrid/dhtmlxCalendar/codebase/skins/dhtmlxcalendar_dhx_skyblue.css">
<script src="./codebase/excells/dhtmlxgrid_excell_dhxcalendar.js"></script>
<script src="./codebase/ext/dhtmlxgrid_drag.js"></script>
<script src="./codebase/ext/dhtmlxgrid_mcol.js"></script>
<script src="./codebase/ext/dhtmlxgrid_splt.js"></script>
<script src="./codebase/ext/dhtmlxgrid_selection.js"></script>
<div id="gridbox" style="width:600px;height:210px;background-color:white;"></div>
<br>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("a,b,c,d,e");
mygrid.setInitWidths("150,150,150,150,150");
mygrid.setColTypes("dhxCalendar,edn,edn,edn,edn");
mygrid.setDateFormat("%d-%m-%Y", "%d/%m/%Y");
mygrid.setColSorting("date,int,int,int,int");
mygrid.splitAt(2);
mygrid.init();
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("grid_formatting.xml");
</script>
the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row id="1">
<cell>05/01/1998</cell>
<cell>-1500</cell>
<cell>12.99</cell>
<cell>-1500</cell>
<cell>12.99</cell>
</row>
<row id="2">
<cell>01/01/2000</cell>
<cell>1000</cell>
<cell>0</cell>
<cell>1000</cell>
<cell>0</cell>
</row>
<row id="3" selected="1">
<cell>12/01/2001</cell>
<cell>-200</cell>
<cell>7.99</cell>
<cell>-200</cell>
<cell>7.99</cell>
</row>
<row id="4">
<cell>01/01/1992</cell>
<cell>350</cell>
<cell>11.10</cell>
<cell>350</cell>
<cell>11.10</cell>
</row>
<row id="5">
<cell>01/01/2003</cell>
<cell>700</cell>
<cell>7.70</cell>
<cell>700</cell>
<cell>7.70</cell>
</row>
<row id="6">
<cell>30/10/1999</cell>
<cell>-1200</cell>
<cell>0</cell>
<cell>1500</cell>
<cell>12.99</cell>
</row>
<row id="7">
<cell>01/01/2005</cell>
<cell>1500</cell>
<cell>12.99</cell>
<cell>1500</cell>
<cell>12.99</cell>
</row>
<row id="8">
<cell>15/10/2001</cell>
<cell>500</cell>
<cell>9.70</cell>
<cell>500</cell>
<cell>9.70</cell>
</row>
<row id="9">
<cell>12/01/1991</cell>
<cell>400</cell>
<cell>0</cell>
<cell>400</cell>
<cell>0</cell>
</row>
</rows>
when mygrid.splitAt(2) is invoked, the column ‘a’ sort failed,
when don’t invoke mygrid.splitAt(2), the colum ‘a’ sort success, is it a bug?
can someone provide a solution? many thanks.
Note: the data type of column ‘a’ is date type