首页 > Dhtmlx > dhtmlxGrid表格跨行跨列使用说明

dhtmlxGrid表格跨行跨列使用说明

跨行使用

	mygrid = new dhtmlXGridObject('gridbox');
    mygrid.init();
    mygrid.enableRowspan(true)
    mygrid.loadXML("grid.xml",function(){
        mygrid.setRowspan(3,3,3);
        mygrid.setRowspan(3,2,2);
    }); 
    =================XML================
    <?xml version="1.0"?>
    <rows>
    <row id="6">
        <cell>-1200</cell>
        <cell rowspan="5">The Dark Half</cell>
        ...
    </row>
	

跨列使用

	<script>
		mygrid = new dhtmlXGridObject('gridbox');
		...
		mygrid.enableCollSpan(true);
		mygrid.init();
		mygrid.loadXML("grid_cp.xml");
	</script>
    Fragment of grid_cp.xml
     <row id="1">
        <cell>-1500</cell>
        <cell colspan="2">A Time to Kill - John Grisham</cell>
        <cell></cell>
        <cell>1</cell>
        <cell>24</cell>
        <cell>0</cell>
        <cell>05/01/1998</cell>
    </row>
	

除非注明,文章为IT热血青年原创,欢迎转载!转载请注明本文地址,谢谢。
本文地址:http://blog.itblood.com/dhtmlxgrid%e8%a1%a8%e6%a0%bc%e8%b7%a8%e8%a1%8c%e8%b7%a8%e5%88%97%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e.html

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.