Dear Sir,
I used the dht 5.02 and I have the problem on the function of group by the row and split mode.
I don’t know where is wrong.
Could you help me how to give me the suggestion.
Thand you very muich.
my code is :
myGrid = new dhtmlXGridObject('gridbox');
myGrid.setImagePath("dht/codebase/imgs/");
//myGrid.setHeader("日期,銷售佣金,信用卡,顧問佣金");
myGrid.setHeader("日期,時閒,商店編号,商店名稱,交易編号,銷售收入,推廣收入,佣金,租金,廣告費,年費,會費,物流,運費,快遞,註冊,顧問,其它,退款,完成,未完成,盈利/虧損");
//myGrid.attachHeader(["#rspan","#rspan","#rspan","#rspan","#rspan","#rspan","Bestseller","Published"]);
myGrid.setInitWidths("250,250,250,250,250,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100");
myGrid.enableAutoWidth(true);
myGrid.setColAlign("left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left,left");
myGrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
myGrid.setColSorting("date,str,str,str,str,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed");
myGrid.customGroupFormat=function(text,count){
return "Grouped by "+text+", there are "+count+" related records"
};
myGrid.splitAt(4);
myGrid.init();
myGrid.attachFooter("總銷售佣金,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan");
myGrid.attachFooter("總信用卡費,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan");
myGrid.attachFooter("總顧問佣金,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan");
myGrid.load("xml/grid_testing_shop_data.xml",function(){
myGrid.groupBy(3);
});