this is the xml:
<?xml version='1.0' encoding='UTF-8'?>
11
0
12
Dag
6
116
2
-2
13:31
11
0
12
Late shift
2
116
0
-2
15:15
11
0
12
Nacht shift
1
116
2
3
16:16
and these are the configurations :
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(“<?=BASEURL?>fw_headers/js/dhtmlx/dhtmlxgrid/codebase/imgs/”);
mygrid.setHeader(" <?=LBL_ROUTENUMBER?>,<?=LBL_DIRECTION?>,<?=LBL_NUMBEROFSTOPS?>, <?=LBL_SHIFTNAME?>, <?=LBL_COUNTPERSONS?>,<?=LBL_OVERCAPACITY?>,<?=LBL_SUMCAPACITY?>,<?=LBL_OVERFLOW?>,<?=LBL_DURATION?>");
mygrid.setInitWidths(“30,55,50,100,70,100,100,100,53”);
mygrid.setColAlign(“center,center,center,center,center,center,center,center,center”);
mygrid.setColTypes(“ro,ch,ro,ro,edn,ro,ro,ro,ro”);
mygrid.setColSorting(“int,int,int,int,int,int,int,int,int”);
mygrid.enableMultiselect(true);
mygrid.enableAlterCss(“even”,“uneven”);
mygrid.enableAutoHeigth(true);
mygrid.init();
mygrid.setSkin(“light”);
mygrid.loadXML("<?php echo BASEURL; ?>/xml_grids/<?=$actFileName?>");
mygrid.setSizes();
mygrid.enableMultiselect(false);
I tried to order a column containing numbers and I can’t.
I have checked their type and they are all strings (all the values, including numbers, all thought when I built the xml I used intval to convert them into int: fwrite($fp," “.intval($bustrip[‘CountPersons’]).”\n"); )
XML, which you are using is incorrect, all rows have the same ID , but ID must be unique for each row.