Panel fails to expand if I use OnItemClicked and ContentTemplate

10 posts, 0 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 13 Sep 2011 Link to this post

    I'm using the Telerik.Web.UI dll version v2011.2.712.35 and have a RadPanelBar that has 5 RadPanelItems.

    3 of these items have an items collection in them which will be used to nvaigate around my site.
    The RadPanelBar has the OnItemClicked handler configured so that the RadPanelItems can be acted upon once clicked.

    The other 2 will be used as login and account detail panels. Only one will be visible depending on the state of the user (logged in or not).

    The "Logged In" panel has an Items collection and makes use of the OnItemsClicked even handler mentioned above for its items.

    The "Not Logged In" panel has a ContentTemplate configured in such a way as to show a small login form, consisting of 2 RadTextBoxes and a RadButton.

    Now, heres the problem.

    If the user is not logged in, the panel with the ContentTemplate is visible, and if the user then clicks anywhere on that panels header to expand it - other than on the arrow - the then panel doesnt expand. If the user clicks the arrow icon on the panel then it does expand.
    But if the user clicks on any of the other visible RadPanelItems headerbars they do expand regardless of where on the headeer they click.

    It seems that if you use the OnItemClicked handler to handle events in your RadPanelBar, and any of the RadPanelItems uses a ContentTemplate, then the expand/collapse features misbehave unless you specifically click the icon in the header.

    Has anyone else experienced this, or does anyone know how to fix it?
  2. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 13 Sep 2011 Link to this post

    Quick update...

    Have also noticed that when the arrow is used to expand the panel with the ContentTemplate in, clicking the arrow to collapse it won't work, but clicking anywhere else on the header will?

    Given that my RadPanelBar has theExpandMode property is set to SingleExpandedItem and AllowCollapseAllItems is set to false, surely I shouldn't be allowed to collapse this panel at all?

    Very odd...
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 16 Sep 2011 Link to this post

    Hi Karl,

    It looks like the scenario that you describe is very customized one and the information that you provide in not sufficient to reproduce the issue that you encounter. Also since there could be many reasons causing this issue my suggestion would be to open a support ticket and send us a simplified runnable project (containing only the very necessary controls that are needed) where we could inspect the issue and determine the proper behavior of the control in the context of your scenario.

    Greetings,
    Kate
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
  5. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 16 Sep 2011 Link to this post

    It really isn't that custom to be honest, infact I would go so far as to say this would be fairly standard behaviour.

    I will open a ticket and upload my test project so you can see for yourself...
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 17 Sep 2011 Link to this post

    If you open up firefox\firebug in the Console tab...there are no script errors?
  7. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 19 Sep 2011 Link to this post

    Hi Steve, 

    No script errors, but I do have 9 WebResource.axd warnings along with 2 of my own css warnings for "top" and "left".

    I have a ticket open with Telerik now. Hopefully I'll hear something soon.
  8. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Sep 2011 Link to this post

    Hi Karl and Steve,

    As I wrote in the ticket that I sent earlier to Karl the behavior that you experience is a bug of the RadPanelBar control that I already logged in our internal system so it can be fixed.

    Regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  9. Shonda
    Shonda avatar
    36 posts
    Member since:
    Apr 2009

    Posted 11 Oct 2011 Link to this post

    I just ran into this one myself and have noticed that I am never even getting into my ItemClick method.  Any ideas when the will be fixed?
  10. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 12 Oct 2011 Link to this post

    Hello Shonda,

    I addressed the issue to our development team, however I can not give any time frame when the bug will be fixed. They are currently doing their best, so please, wait until the beta release of the controls and check if it has been resolved.   

    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  11. Karl
    Karl avatar
    172 posts
    Member since:
    Sep 2010

    Posted 12 Oct 2011 Link to this post

    Shonda, something you might want to look at in the time being is this...

    I have noticed that when a header is clicked, The e.Item.Expanded value is set to true for normal RadPanelItems that contain an Items collection, but for those that have a ContentTemplate, this value is false.

    If I alter the ItemClicked event to change the e.Item.Expanded value to true for RadPanelItems that have a ContentTemplate, then things behave as expected.

    protected void ItemClicked(object sender, RadPanelBarEventArgs e)
    {
        switch (e.Item.Value)
        {
            case "Login"//ContentTemplate Item
                e.Item.Expanded = true;
                //Possible method call here...
                break;
            case "Logout"//Items Collection Item
                Logout();
                break;
            case "Other option"//Items Collection Item
                //Do something else
                break;
        }
    }
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017