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

Trying to "swallow" the expand event whilst allowing the click event.

1 Answer 68 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
hkdave95
Top achievements
Rank 2
hkdave95 asked on 18 Apr 2008, 11:11 PM
 function SwallowClick(oPanelItem, oE)  
                            {  
                                //oPanelItem.get_panelBar().trackChanges();  
                                if (!oPanelItem.get_expanded)  
                                    oPanelItem.set_expanded = false;  
                                else  
                                    oPanelItem.set_expanded = true;  
                                //oPanelItem.get_panelBar().commitChanges();  
                            } 

Hi

The above code "swallows" the expand event on the Panelbar, but allows the click event. The cancel functionality does not work because it swallows both the expand and click event.

The problem is that it no longer works where similar code worked fine in ASP.NET.

Any ideas ?

Kind Regards

David

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 21 Apr 2008, 07:33 AM
Hi hkdave95,

Please, review the following KB article: Preserve the expand and collapse functionality of an item which has its NavigateUrl property set.

You can use the JavaScript in point (7) from the first section - RadControls for ASP.NET AJAX - as an example of how to do this properly.

I hope this helps.

Kind regards,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
PanelBar
Asked by
hkdave95
Top achievements
Rank 2
Answers by
Simon
Telerik team
Share this question
or