
后来又找了下其它的控件如 YUI、Chgrid以及其他一些很简单的控件,功能实现的都比较少,就没有仔细看了
dhtmlxGrid官方地址:http://scbr.com/docs/products/dhtmlxGrid/ 进去后就有个例子。
dhtmlxGrid几个重要的满足我们需求的特性有:
1、丰富的客户端事件处理API,大到整个表格,小到单元格每个cell,能想到的事件处理都俱全,粗略的计算了一下,至少有200来个;
2、表格可以用键盘控制,方向键,tab等;
3、支持ajax;
4、支持表格列宽的拖动;
5、支持排序;
6、灵活的css样式控制;
7、选中行高亮
8、兼容比较好,IE、Firfox、Mozilla能够很好的兼容
下面是官方的说明:
· wide and powerful client side api
· navigation with keyboard
· Dynamical loading
· Data buffering
· 90% compatibility with Scand's jTreeTable api (grid part)
· fully customizable appearance
· XML support
· 12 predefined Cell Editors (eXcell)
· ability to create your own Cell-Editors (eXcell)
· three types of data sorting (date,string,int)
· column resizing
· horizontal & vertical scrolling
· single/multi-line rows
· single/multi row selection
· on/off header
New in version 1.1
· Smart rendering
· Paginal output
· Colspan
· Split mode
New in version 1.2
· Move columns
· Add/Remove Columns
· Export to\from CSV
· Initialization from HTML Table
· Multirow header/footer
· Clipboard operations
· Column(s) with variable size
· IE 5.x and above
· Mozilla 1.4 and above
· FireFox 0.9 and above
· Safari 1.3 and above
值得商榷的几个问题:
1、这个控件是基于GPL license的,如果使用的话会不会侵权?
2、Table中所表现的数据来源只有两种方式:
Initialize Grid from HTML table和从XML文件中加载数据,给出的例子的数据都是基于XML文件,表格中所有数据都是存放在XML文件中再加载的,不知道这种处理方式对我们的使用会不会造成影响?虽然手册中说明数据可以从HTML table中解析数据,我试了下也不好用;