Saturday 15 June 2013

extjs - Ext JS Grid Panel Height Property -



extjs - Ext JS Grid Panel Height Property -

i'm creating grid using ext js. need increment height of grid panel automatically increment of number of rows in grid. property of ext js grid can set implement this?

just don't specify value height property, , that's all.

try here: https://fiddle.sencha.com/#fiddle/bnl

ext.create('ext.data.store', { storeid:'simpsonsstore', fields:['name', 'email', 'phone'], data:{'items':[ { 'name': 'lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" }, { 'name': 'bart', "email":"bart@simpsons.com", "phone":"555-222-1234" }, { 'name': 'homer', "email":"home@simpsons.com", "phone":"555-222-1244" }, { 'name': 'marge', "email":"marge@simpsons.com", "phone":"555-222-1254" } ]}, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } }); // don't specify height when creating grid ext.create('ext.grid.panel', { title: 'simpsons', store: ext.data.storemanager.lookup('simpsonsstore'), columns: [ { text: 'name', dataindex: 'name' }, { text: 'email', dataindex: 'email', flex: 1 }, { text: 'phone', dataindex: 'phone' } ], width: 400, renderto: ext.getbody() });

extjs grid

No comments:

Post a Comment