How do you create table columns and fields from json? (Dynamic Grid)

前端 未结 3 1107
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 14:03

I have a json file and I assume that I do not know anyting about the content. I do not know the model. However it is given in the json file the model, the data, and other in

3条回答
  •  一个人的身影
    2020-12-29 14:30

    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.reader.Json -> Response MetaData section

    in the grid don't forget to add this one columns: [], then under the store listeners: { 'metachange': function(store, meta) { myGrid.reconfigure(store, meta.columns); } } and the response json file should have metaData with fields and columns. Read Response MetaData section in the documentation for more info.

提交回复
热议问题