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


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

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

    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
    Iliana Nikolova avatar
    2571 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. 

    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!
Back to Top