开发者

how to rebind array to dataTables.net grid

I am using dataTables.net jquery grid to display data in html table. I cou开发者_JAVA技巧ldn't find a method to set the array as datasource dynamically and rebind the grid.

Please let me know.


You can update the datatable by calling fnDraw() method. However the Datatables will read the data again from the actual data source (Ajax URI, in your case) ONLY if bServerSide: true is set (by which you are telling the Datatables that all the processing is done at server side).

One side effect of bServerSide: true is that you need send the pagination details (iTotalRecords & iTotalDisplayRecords, .. ) & other data in the Ajax response (see Server-side Processing docs).

Othre side effect is that filtering will not work any longer :( Datatable can't filter the partial data which it has.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜