PDA

View Full Version : The best way to design a page



newusername
10 Feb 2014, 10:15 PM
Hi ,

I want to design the page like follow, what is the best component I can use here .


47873
If you provide basic code for this it will be great. I can directly use table but instead of that which component is available for this kind of page.

scottmartin
11 Feb 2014, 10:34 AM
Initial thought would be a grid:

You can paste and run the code here:
https://fiddle.sencha.com/#home



Ext.onReady(function () {

Ext.create('Ext.data.Store', {
storeId : 'simpsonsStore',
fields : ['name', 'change'],
data : {'items' : [
{ 'name' : 'abc', 'change' : 99.9 },
{ 'name' : 'abc', 'change' : 99.9 },
{ 'name' : 'abc', 'change' : 99.9 },
{ 'name' : 'abc', 'change' : 99.9 }
]},
proxy : {
type : 'memory',
reader : {
type : 'json',
root : 'items'
}
}
});

Ext.create('Ext.grid.Panel', {
title : 'Grid',
store : Ext.data.StoreManager.lookup('simpsonsStore'),
columns : [
{ header : 'Name', dataIndex : 'name', flex: 1 },
{ header : 'Change', dataIndex : 'change' }
],
//height : 200,
width : 400,
renderTo : Ext.getBody(),

});

});