This is a migrated thread and some comments may be shown as answers.

Extend the panelBar

1 Answer 106 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Anders Bengtsson
Top achievements
Rank 1
Anders Bengtsson asked on 16 Apr 2012, 02:02 PM
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.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 19 Apr 2012, 01:52 PM
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!
Tags
PanelBar
Asked by
Anders Bengtsson
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or