Results 1 to 3 of 3

Thread: Trouble initialize tbar dynamically

  1. #1

    Default Trouble initialize tbar dynamically

    I'm having some (for me) odd difficulties to initialize a the tbar-config in a gridpanel.
    If I initialize the tbar static, aka:
    tbar : [ { ... }] it works swell.

    But If I use a global variable somewhere else:
    var tBar = "[{ ... }]";

    and then later on in my extJs do like this:
    tbar: tBar
    The tbar is just treated as a string, or in other words, when I later do an alert, it will just print
    a plain string. Whereas the static initialization would give something like {Object Object}, {Object Object}, ...

    Any suggestions why this happen and what to do?

    Ole Christian

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    The Netherlands


    var tBar = [{ ... }];
    and not
    var tBar = "[{ ... }]";

  3. #3


    Hi Condor!
    Thanks for your reply.
    I initially tried that, but the error I got from had nothing to about the structure (I realize now) but from an unknown handler.
    This however will be easily solved.
    Thanks again!

    Ole Christian

Similar Threads

  1. [3.2] Trouble Dynamically Adding GridPanel to TabPanel
    By mrapczynski in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 2 Jul 2010, 7:14 AM
  2. Trouble with Grid with dynamically generated column model
    By lohithk in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 22 Dec 2008, 9:34 PM
  3. tabs tbar dissapears when tbar button clicked
    By robert_speer in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Aug 2008, 7:47 AM
  4. how to make tbar in the GridPanel dynamically by json?
    By holala in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 22 Jul 2008, 12:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts