星期五, 七月 27, 2007

DHMTL Grid Paginal 语法.

http://www.nauticalworld.co.uk/jscripts/dhtmlxTreeGrid/samples/pro_paging_wt.html

<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div>//显示grid数据地方
<div id="recinfoArea" style="width:100%;"></div>//用来显示导航条的地方
<script>
mygrid = new dhtmlXGridObject('gridbox');
...
//should be called before init()
mygrid.enablePagingWT(true,10,3,"recinfoArea");
...
mygrid.init();
mygrid.setXMLAutoLoading("dynscroll.php");//如果想每次点击下一页的时候从服务器读取数据,必须要加入这一行,通过url参数rowsLoaded=N 在服务器段来获取下一页的数据

mygrid.loadXML("dynscroll.xml");//this sample uses static loading
</script>