Reply to comment

Flexigrid is one of the most usefull and powerfull grid plugins for jQuery. Unfoirtunatelly, as ahotur explain in the project page, there is no much documentation so you must learn how to use it looking at existing code.

Flexigrid

If anytime you need to fill a flexigrid with JSON or XML content and you are a little buggy to look at example code, here is the summary of history:

  • Remember XML/JSON data must follow the next rules: total, page, rows. And for every row specify and id and a cell structure.

Sample data for both types are:

{ page: 1, total: 2, rows: [ {id: 'reg1', cell: ['reg1-cell1','reg1-cell2']}, {id: 'reg2', cell: ['reg2-cell1','reg2-cell2']} ] } 1 2 reg1-cell1 reg1-cell2 reg2-cell1 reg2-cell2

Finally, to use your XML/JSON data to create a flexigrid component you need to:

  • Put some element on your HTML document: <p id="yourId"></p>
  • Convert that element into a flexigrid with: $("#yourId").flexigrid({ url: 'your_file_name.json_or_xml', dataType: 'json', ... }

Now you know how to build a flashy flexigrid.

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.