Flexigrid loads data from a local json object

I am trying to populate a flexigrid table from a local json object created using this code:

var rows = new Array();
rows.push({cell: [1, 2, 3] });
rows.push({cell: [11, 22, 33] });
rows.push({cell: [111, 222, 333] });

var data = {
    total: 3,    
    page:1,
    rows: rows
}

$('table').flexAddData(data);//.flexReload();

but after doing this, it just empties my table.

a complete and lively example can be seen here

Notes: -> I comment on the last line that is trying to load the json object because it empties the table. -> In this jsfiddle example, I use the link for flexigrid from the site flexigrid.info, which does not work in chrome, it works in firefox.

+3
source share
1 answer

I understand, when I initially created the flexigrid table, I miss

dataType : 'json'

: http://jsfiddle.net/m93qg/3/

+4

All Articles