[CLOSED] tab/Panel autoheight not working

Page 3 of 3 FirstFirst 123
  1. #21
    Thank you, that worked for the sample code,

    I am trying to implent this solution on the original code but my problem is that the code inside the panel is under a usercontrol page (ASCX) (Which has the grid panel) when I try to access tab 2 that is in the ASPX from the usercontrol ASCX page, i get a javascript error:
    Microsoft JScript runtime error: Unable to get value of the property 'doLayout': object is null or undefined
  2. #22
    Please post an updated sample. This will help us avoid having to guess what might be going wrong.

    Please simplify you sample down to the ABSOLUTE minimum required to reproduce the problem. Less than 100 lines of code would be appreciated.
    Geoffrey McGill
    Founder
  3. #23
    I am still tweaking the sample code to rerproduce the same error.

    Quick question: Does app in app.tab2.DoLayout() represent page? if so how can we access IDs from parent page?
  4. #24
    Quote Originally Posted by otouri View Post
    Quick question: Does app in app.tab2.DoLayout() represent page?
    Not a page. "App" is the default Ext.NET namespace. It is shared in the global object, i.e. window. Fully write:
    window.App.Tab2
    Please note that "App" is uppercase, doLayout() is lowercase. JavaScript is a case-sensitive language.

    Quote Originally Posted by otouri View Post
    if so how can we access IDs from parent page?
    This way:
    parent.App.Tab2.doLayout();
  5. #25
    mmmm I have tried that last night and i didn't work as well.

    I believe that my problem is that my page inherits from a master page and my <form> is declared in the Master page.
    Here is Why:

    1. When I implemented you solution in my sample code without inheritance to the master, your solution worked perfectly.
    2. When I add inheritence to my master page in the sample code, your soplution stops working. and I receive the same javascript error message.


    I am not sure why i get this error.
    Please help this issue is a show stopper for a major production release.
  6. #26
    Please try
    #{Tab2}.doLayout();
    #{} syntax resolves the ID.

    Just if a control is added to an INamingContainer, then its client id doesn't equal the server ID.
  7. #27
    Thank you, thank , thank you. that solved the problem
  8. #28
    It is nice to help you!

    Please note that posting a runnable sample to reproduce in the initial post would solve your problem in a moment;)
  9. #29
    thank you.

    Just curious for this scenario you have suggested to use a listener on the store and trigger the doLayout() javascript method on the Load attribute.

    What if we had a grid panel that had an insert record functionnality what attribute will you use? will you still use Load?

    The grid panel will strech automatically as you insert the record what about the panel?
  10. #30
    Quote Originally Posted by otouri View Post
    What if we had a grid panel that had an insert record functionnality what attribute will you use? will you still use Load?
    Probably, the DataChanged event is what you need.
    http://docs.sencha.com/ext-js/4-1/#!...nt-datachanged

    Quote Originally Posted by otouri View Post
    The grid panel will strech automatically as you insert the record what about the panel?
    Yes, the GridPanel will be adjusted automatically, but the Panel, I think, won't in your scenario.
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 2
    Last Post: Oct 04, 2012, 10:14 AM
  2. [CLOSED] MenuPanel AutoHeight is not working in V1.0?
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 23, 2010, 5:59 PM
  3. [1.0] Panel autoheight
    By SouthDeveloper in forum 1.x Help
    Replies: 2
    Last Post: Feb 12, 2010, 6:30 PM
  4. [CLOSED] panel autoheight
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 18, 2009, 2:07 PM
  5. [CLOSED] GridPanel AutoHeight is not working like I would hope
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 29, 2009, 5:24 PM

Posting Permissions