[CLOSED] Panel#findReExpander must be passed a valid collapseDirection

  1. #1

    [CLOSED] Panel#findReExpander must be passed a valid collapseDirection

    Hello,

    I have a viewport with some panels. For a Panel in the code behind on Page_Load we set the Collapse direction:

    panel.CollapseDirection = Direction.Left;
    But when I click on the collapse button an exception is thrown, in this point:

    throw ("Panel#findReExpander must be passed a valid collapseDirection")
    It seems to me that it fails to found the right item in the switch. In the direction variable I see "Left", but in the switch I see:

                
                case c.DIRECTION_TOP:
                case c.DIRECTION_BOTTOM:
                   // more code
                case c.DIRECTION_LEFT:
                case c.DIRECTION_RIGHT:
                   // more code
    and above DIRECTION_LEFT is 'left', not 'Left'.

    I'm using the version 2.0 (last from SVN)
    Last edited by geoffrey.mcgill; Sep 29, 2012 at 2:05 AM. Reason: [CLOSED]
  2. #2
    Hi @sbg,

    I am unable to reproduce with this Panel.
    <ext:Panel runat="server" Collapsible="true" CollapseDirection="Left" />
    "Left" is rendered as "left".

    I'm using the version 2.0 (last from SVN)
    The last sources are here:
    http://svn.ext.net/premium/branches/2.1/
  3. #3
    Quote Originally Posted by Daniil View Post
    The last sources are here:
    http://svn.ext.net/premium/branches/2.1/
    Are there any breaking changes from 2.0?

    thank you
  4. #4
    Quote Originally Posted by Daniil View Post
    Hi @sbg,

    I am unable to reproduce with this Panel.
    <ext:Panel runat="server" Collapsible="true" CollapseDirection="Left" />
    "Left" is rendered as "left".
    Yes, from markup it is rendered as "left", but if you change it in an ajax event, the eval code pushed to the client is like this:

    ({
        App.PanelvxoDL2AaIkiTm8yexCcLg.collapseDirection=\"Left\";
    })
  5. #5
    Quote Originally Posted by sbg View Post
    Are there any breaking changes from 2.0?
    There are mainly bug-fixes and improvements. Generally, there should not be breaking changes. Though I can't guarantee.

    Anyway, the SVN log is at your service.

    Quote Originally Posted by sbg View Post
    Yes, from markup it is rendered as "left", but if you change it in an ajax event, the eval code pushed to the client is like this:

    ({
        App.PanelvxoDL2AaIkiTm8yexCcLg.collapseDirection=\"Left\";
    })
    This property should not be changed during AJAX, it is a config option. So, it doesn't make any sense without re-rendering. This should work:

    protected void ChangeCollapseDirection(object sender, DirectEventArgs e)
    {
        this.Panel1.SuspendScripting();
        this.Panel1.CollapseDirection = Direction.Right;
        this.Panel1.ResumeScripting();
        this.Panel1.Render();
    }

Similar Threads

  1. TextField not load value passed from json
    By marcelorosait in forum 1.x Help
    Replies: 0
    Last Post: Feb 29, 2012, 7:28 PM
  2. Replies: 1
    Last Post: Dec 15, 2010, 2:50 PM
  3. Replies: 1
    Last Post: Mar 16, 2010, 10:28 AM
  4. the scroll property of the panel is not valid
    By animalisme in forum 1.x Help
    Replies: 4
    Last Post: Aug 10, 2009, 4:35 AM
  5. GridPanel data passed to Server side
    By egodoy in forum 1.x Help
    Replies: 1
    Last Post: Feb 23, 2009, 12:00 PM

Tags for this Thread

Posting Permissions