Server side item click - client size expand collapse

3 posts, 1 answers
  1. Fabio Laserra
    Fabio Laserra avatar
    28 posts
    Member since:
    Oct 2009

    Posted 21 Jan 2010 Link to this post

    Hello,
    I'm trying for first time rad controls. I would like to use PanelBar in server side mode, but I have noticed that also collapse/expand actions are fired server/side. Is there a way to expand/collapse client side, but catch item clics server side?

    Thank you
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Jan 2010 Link to this post

    Hello,

    Try the following client side code.

    JavaScript:
     
        function ClientItemClicking(sender, args) { 
            if (args.get_item().get_items().get_count() != 0) { 
                args.get_item().set_expanded(!args.get_item().get_expanded());  
                args.set_cancel(true); 
            } 
        } 
    [Attach OnClientItemClicking event to PanelBar.]

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fabio Laserra
    Fabio Laserra avatar
    28 posts
    Member since:
    Oct 2009

    Posted 22 Jan 2010 Link to this post

    Thank you! It works :)
Back to Top