开发者

DHTMLX Grid Object Alternative

So my team has inherited a legacy system which provides reports using the dhtmlxgrid library which loads the data via an xml file. While it is working there is certain functionality that appears t开发者_StackOverflow中文版o be missing that we have had to hack solutions to provide. Some of these include:

  • A loading indicator built into the actual object that is cogniscent of when the report has loaded (the grid object has something like this but isn't very reliable imo)
  • Ability to display some sort of pane that indicates there is no data loaded as oppose to just displaying an empty grid
  • Be able to load data from a jsp with embedded xml
  • Better documentation / examples (Not a big priority but would be nice)

In doing some research there appears to be quite a few jQuery libraries that provide grid solutions but it is a bit difficult to narrow down the vast array of options down. Any suggestions would be greatly appreciated. (Don't need to be jQuery either, anything is appreciated).

Thanks so much.


I'll try to provide some constructive info.

While not the best library around, you can do some of the things you need with dhtmlx:

1.1 Loading indicator: The onXLS and onXLE events signal when transfers start and end. The dhxLayout object can show progress indicators on a particular cell or over the whole document.

grid.attachEvent("onXLS", function() {  dhxLayout.cells("b").progressOn();  });
grid.attachEvent("onXLE", function() {  dhxLayout.cells("b").progressOff();  });

You can also use your own loading indicator in those events.

1.2 Similarly, you can use the onXLE event to manually add a row signalling that there is no data available.

grid.attachEvent("onXLE", function() { 
    if (grid.getRowsNum() == 0) {
        grid.addRow('noitems', ["No items!"]);
        //grid.setColspan('noitems', 1, 2);
    }
});

1.3 Local XML loading from strings should work, and XML Islands are supported only in IE iirc. Truly, dhtmlx documentation stinks and the loading format docs are spread all over the forums, the wiki and the samples. For this case, check this:

http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:data_loading

1.4 I share your opinion about documentation (it's really bad and doesn't live up to the standards I'd expect from a mature library) but at least I've found the forums pretty supportive.

That said, when coding in Java and Struts2 my favourite is the DisplayTag+jQuery plugin combination ( see 'Grid' in http://www.weinfreund.de/struts2-jquery-showcase/index.action ). Java aside, other pure JS solutions I've hearing about these days are jmesa ( http://code.google.com/p/jmesa/ ) and DataTables ( http://datatables.net/ ).

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜