I am using a panel bar in my code and wish to have it expanded on load and always and prevent it from collapsing when clicked at header, any thoughts please ?
thanks,
Anand
3 Answers, 1 is accepted
0
Petur Subev
Telerik team
answered on 23 Jan 2012, 12:30 PM
Hello Narayanarao,
Generally speaking to achieve this you should:
Initially expand each of the panels. You can use the ItemAction method .ItemAction(item=>item.Expanded=true)
Subscribe a function to the OnCollapse event and call the preventDefault() method exposed by the argument parameter.
All the best,
Petur Subev
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Well I just tried your suggestion, it fixes the collapse problem. But then it is breaking the telerik combobox ! It prevents the telerik combo box from expanding. i.e. i click at the combobox arrow nothing happens . I just remove the "
.ClientEvents(events => events.OnCollapse("preventCollapseOfPanel()"))"
and it works good. the script is as below
function preventCollapseOfPanel(e){
e.preventDefault();
}
please suggest .
Thanks,
Anand
0
Petur Subev
Telerik team
answered on 23 Jan 2012, 01:58 PM
Hello again Narayanarao,
When you declare the function handling the event you need to pass only the name of the function without the brackets.
i.e.
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now