PDA

View Full Version : How to get all the data in grid



maecy
26 Dec 2013, 12:20 AM
I have this grid and I want to get all the data separately (not as object) and send it to php. 47360This is my grid code:
Ext.ns('dlti.view.widget');//User Maintenance gridExt.define('dlti.view.widget.PlaylistPreviewGrid' ,{ extend: 'Ext.grid.Panel', id: 'playlist-preview', alias: 'widget.PlaylistPreviewGrid', forceFit: true, stripeRows: true, selType: 'rowmodel', autosync: true, height: 150, width: 950, store: new dlti.store.PlaylistPreviewStore(), tbar: [ { xtype: 'label', html: 'Playlist Name: ' }, { xtype: 'label', name: 'playlist-name', icon: 'shared/icons/fam/resultset_previous.png' }, '->', { xtype: 'button', text: 'Back', action: 'back', icon: 'shared/icons/fam/resultset_previous.png' } ], columns: [ { text: 'Filenames', dataIndex: 'filename', renderer: function renderDescTarget(val, p, record) { var desc = ''; desc = '' + val + '
'; return desc; } }, { text: 'Transition', dataIndex: 'transition', renderer: function renderDescTarget(val, p, record) { var desc = ''; desc = '' + val + '
'; return desc; } }, { text: 'Stay Time', dataIndex: 'timeframe', renderer: function renderDescTarget(val, p, record) { var desc = ''; desc = '' + val + '
'; return desc; } }, { text: 'Terminals', dataIndex: 'terminal_id', renderer: function renderDescTarget(val, p, record) { var desc = ''; desc = '' + val + '
'; return desc; } }, { text: 'Last Update', dataIndex: 'update_date', renderer: function renderDescTarget(val, p, record) { var desc = ''; desc = '' + val + '
'; return desc; } }, ]});

Malte123
26 Dec 2013, 10:05 AM
first I would use PHP-Code to show my code here ... It is hard to follow your code like this ... maybe you use the Preview Post feature :)

Next:
You need to filter your store


store.clearFilter();
store.filter('key','filterString');


If you have done this, you can try to find the right node in Store by using


console.log(store);


for example:
your Store has seperated date in
store.data.attributes.DataStringAttributeForPHP
you can us this to call a local PHP-File (only local !!! - JS-Restrictions)

There are other ways to call extern URLs but this is another question.

Please do not forget to motivate me by voting up and select my answer as best answer if there is no better answer. So I can get help from more experienced programmers with much more difficult questions. :)