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

I oinly want to expand the RadPanelbar if the image on the left is clicked. My code worked in ASP.NET but now does not work in Prometheus

1 Answer 47 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:06 PM
Hi

The Javascript I am trying to use is:

                            function SetImageClick(oPanelbar, oE)  
                            {  
                                for (var i = 0; i < oPanelbar.get_allItems.length; i++)  
                                {  
                                   if (oPanelbar.get_allItems[i].get_imageElement)  
                                   {  
                                        oPanelbar.get_allItems[i].get_imageElement.AssociatedItem = oPanelbar.get_allItems[i];  
                                        oPanelbar.get_allItems[i].get_imageElement.onclick = function (oE)  
                                        {  
                                            oPanelbar.trackChanges();  
                                            if (!oE) oE = window.event;  
                                            if (this.AssociatedItem.get_expanded)  
                                                this.AssociatedItem.set_expanded = false;  
                                            else  
                                                this.AssociatedItem.set_expanded = true;  
                                            oE.cancelBubble = true;  
                                            if (oE.stopPropagation)  
                                                oE.stopPropagation();  
                                            oPanelbar.commitChanges();  
                                            return false;  
                                        }  
                                    }  
                                }  
                            }    
 

This code worked in ASP.NET but now does not work in Prometheus.

NB: I have added trackChanges and commitChanges for prometheus.

Kind Regards

David

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 21 Apr 2008, 07:20 AM
Hello 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 a reference.

Fore more information on the the client-side APIs of RadPanelBar and RadPanelBarItem, please read the online documentation:
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