开发者

How to load array of object into extjs gridpanel

开发者 https://www.devze.com 2023-01-20 07:18 出处:网络
I am new to ExtJS. In examples, I do not find any one similar to my situation: I have an Array of Object like bellow:

I am new to ExtJS. In examples, I do not find any one similar to my situation: I have an Array of Object like bellow: arr = new Array(); obj = new Object(); obj.St开发者_如何学PythonringField = "Field1"; obj.IntField = 1; arr.push(obj); obj = new Object(); obj.StringField = "Field2"; obj.IntField = 3; arr.push(obj); obj = new Object(); obj.StringField = "Field3"; obj.IntField = 5; arr.push(obj); How to put this in to GridPanel?


You can create a grid panel with an ArrayReader : http://www.sencha.com/learn/Manual:Data:Readers:ArrayReader

There's also an example: http://dev.sencha.com/deploy/ext/examples/grid/array-grid.html

0

精彩评论

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