Extend the panelBar

2 posts, 0 answers
  1. Anders Bengtsson
    Anders Bengtsson avatar
    9 posts
    Member since:
    Dec 2006

    Posted 16 Apr 2012 Link to this post

    Hello,

    if I want to add behaviour of the expand function, how can I do this.

    function onExpand(e) {
        setTimeout(function(){ 
            $("input:first", e.item).focus();
        },1);
    }

    I always want this to happend when expand event is fired. Can I extend the panelBar to always have this function.
    So I dont have to do it on all my pages.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 19 Apr 2012 Link to this post

    Hi Anders,

    In order to specify the behavior of the expand() method and to set it always when expand event is fired, you could create a custom PanelBar that inherits the Kendo UI PanelBar. For convenience I created a jsFiddle example which illustrates this approach in action.  

    In addition, I believe you may find this blog post very useful. 


    Greetings,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top