PDA

View Full Version : Getting more from the server



fatnjazzy
24 May 2010, 10:12 PM
Is it possible to get every data from the server? for example, i want to get the columns items from the server Via Ajax/Proxy?
thanks

var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
{header: 'Price', width: 75, sortable: true, renderer: 'usMoney', dataIndex: 'price'},
{header: 'Change', width: 75, sortable: true, renderer: change, dataIndex: 'change'},
{header: '% Change', width: 75, sortable: true, renderer: pctChange, dataIndex: 'pctChange'},
{header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
],
stripeRows: true,
autoExpandColumn: 'company',
height: 350,
width: 600,
title: 'Array Grid',
stateful: true,
stateId: 'grid'
});

fatnjazzy
28 May 2010, 9:04 PM
Hi
Anyone?
Thanks

BlueCamel
28 May 2010, 9:32 PM
You can define metadata including columns for the Grid in the JSON response. Examples found in the forums by searching on metadata.

mitchellsimoens
29 May 2010, 5:06 PM
@fatnjazzy, welcome to the ExtJS forums... Some of us are old and it's hard to read code without wrapping it in code tags. Next time you post code, can you wrap it in the code tags by using the '#' button on the toolbar?

fatnjazzy
29 May 2010, 7:01 PM
Sure!