-
31 Jan 2013 2:07 AM #1
Answered: Render foreach item of store
Answered: Render foreach item of store
Hi everyone,
I come to you with yet another problem I have with my sencha touch app.
I am currently using Ext.ux.touch.grid.List (thanks Mitchel Simeons by the way
) and am able to render my data in it like so :
What I would prefer to do is to do a foreach because each dataIndex is an item of my store. Is there anyway of doing this ?Code:config: { store : true, scrollable: { direction: 'horizontal', directionLock: true }, columns : [ { header : 'Id', dataIndex : 'id', width : '10%', editor : { xtype : 'textfield' } }, { header : 'Host', dataIndex : 'Host', width : '10%', editor : { xtype : 'textfield' } }, { header : 'Path', dataIndex : 'Path', width : '10%', editor : { xtype : 'textfield' } }, { header : 'SourceHost', dataIndex : 'SourceHost', width : '10%', editor : { xtype : 'textfield' } }, { header : 'SourcePath', dataIndex : 'SourcePath', width : '10%', editor : { xtype : 'textfield' } }, { header : 'DepotId', dataIndex : 'DepotId', width : '10%', editor : { xtype : 'textfield' } }, { header : 'DepotKey', dataIndex : 'DepotKey', width : '10%', editor : { xtype : 'textfield' } }, { header : 'Parent', dataIndex : 'Parent', width : '10%', editor : { xtype : 'textfield' } } }
Thanks for your help
-
Best Answer Posted by novadys-sbu
So basically I had to do in my PHP backend and send the json string back. Then use the eval on success.
-
1 Feb 2013 2:11 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
So you want to get the fields from the store and build the columns for that?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
7 Feb 2013 6:49 AM #3
Basically yes
Basically yes
The solution I'm trying is to create my touchgridpanel dynamically with a PHP backend. Not there yet, but will keep you posted

-
6 Mar 2013 4:55 AM #4
Work around
Work around
So basically I had to do in my PHP backend and send the json string back. Then use the eval on success.


Reply With Quote