Monday 15 June 2015

How to create an extjs grid structure from Json data -



How to create an extjs grid structure from Json data -

just clear, i'm not asking populating grid's records using json file. want create grid's columns using json. recreate grid. columns attributes, including width, locked, visible etc saved in json , json has used recreate grid was.

how go that?

if json string in var myjson , in format:

{ mycolumndefinitions: [ { text: "coltitle1", dataindex: "colfield1", width: 100 }, {...} ] }

your grid syntax should simple as

... extend: 'ext.grid.panel', columns: ext.json.decode(myjson).mycolumndefinitions ...

json extjs

No comments:

Post a Comment