-
24 Jul 2010 7:57 AM #1
dynamically adding tabs from grid column on page load
dynamically adding tabs from grid column on page load
I want to add tabs from grid column on page load dynamically . Grid is pulling data in real time and every time page load it contains different set of data.
-
25 Jul 2010 5:18 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Can you explain a bit more?
-
26 Jul 2010 5:16 AM #3
On page load I need to display a grid which will pull data from a real time data base . I am using json store for it and used jsp to convert into json objects . I am getting the data in my grid but I need to dynamically add tabs from the first column of that grid .
My loop for dynamically adding tabs is not working . I tried to test with an alert and its working great and looping through all the data from first colum but when I am trying tabPanel.add its not working. If you need more information please let me know . I can post the snippets of my code if you want.
Thanks!
-
26 Jul 2010 5:22 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
You need to call doLayout() after adding all tabitems.
-
27 Jul 2010 8:15 AM #5
Thanks! I got the dynamic tabs . I am missing title:columnName.toString() and doLayout ofcourse.....
Code:store.on('load', function(){ store.each(function(rec) { var column1 = rec.get('COLUMN!'); //alert(tieback); tabPanel.add({title:column1.toString()}, tabPanel.doLayout(); }); });
-
28 Jul 2010 10:10 PM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
You only have to call doLayout once, so you should move it out of the each() loop.
-
29 Jul 2010 8:06 AM #7
thanks! this is solved...you can close this thread...but this is still working if I don't move it out of the loop..
Similar Threads
-
Dynamically add tabs from grid column on page load
By paul.laskar in forum Sencha Touch 1.x: DiscussionReplies: 4Last Post: 23 Jul 2010, 3:02 PM -
Adding tabs dynamically
By poppabear in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 26 Mar 2009, 4:55 PM -
Grid column with renderer is blank on page load
By karrelsj in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 19 Mar 2009, 9:14 AM -
dynamically adding a new column on grid
By asmishra in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 2 Apr 2008, 8:33 AM -
Adding dynamically a column to a grid
By Gualterio in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 5 Mar 2008, 9:23 AM


Reply With Quote