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

JS Error when using MultiPage in PanelBar

1 Answer 31 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Chase Florell
Top achievements
Rank 1
Chase Florell asked on 08 Aug 2008, 10:36 PM
Ok so I'm not sure if I am doing this the right way.  Basically what I want is to make a PanelBar with a Width of 100%
Then under each panel is some custom controls etc.  I tried using the ItemTemplate with no luck, so I turned to MultiPage.

I would prefer using the template and just droping my HTML inside each templtate, but I cant figger it out.

Using this code, I am getting A JS error.

            <telerik:RadPageView ID="RadPageView6" runat="server">  
 
<script type="text/javascript">  
    var blnDragging = false;  
            function OnClientItemClicking(sender, eventArgs)  
            {  
                var multipage=$find("RadMultiPage2");  
                multipage.set_selectedIndex(eventArgs.get_item().get_index());  
            }  
            function BeforeDragHandler()  
            {  
                blnDragging = true;  
            }  
              
            function BeforeDropHandler()  
            {  
                blnDragging = false;      
            }  
            function panelMouseOver(sender, eventArgs)  
            {  
                if (eventArgs.get_item().get_text().indexOf("Folders") != -1 && blnDragging)  
                {  
                    var multipage=$find("RadMultiPage2");  
                    multipage.set_selectedIndex(eventArgs.get_item().get_index());  
                }  
            }  
</script> 
 
                <telerik:RadMultiPage ID="RadMultiPage2" runat="server" SelectedIndex="0">  
                    <telerik:RadPageView ID="RadPageView7" runat="server">  
                        RadPageView1  
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="RadPageView8" runat="server">  
                        RadPageView2  
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="RadPageView9" runat="server">  
                        RadPageView3  
                    </telerik:RadPageView> 
                </telerik:RadMultiPage> 
 
                <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="SingleExpandedItem" 
                OnClientItemClicking="OnClientItemClicking" OnClientMouseOver="panelMouseOver" Skin="Telerik" Width="100%">  
                    <Items> 
                        <telerik:RadPanelItem Text="User Administration" /> 
                        <telerik:RadPanelItem Text="Business For Sale Administration" /> 
                        <telerik:RadPanelItem Text="Business Wanted Administration" /> 
                    </Items> 
                </telerik:RadPanelBar> 
 
            </telerik:RadPageView> 
        </telerik:RadMultiPage> 

I just took the code out of the tutorials.

1 Answer, 1 is accepted

Sort by
0
Chase Florell
Top achievements
Rank 1
answered on 08 Aug 2008, 11:09 PM
Forget it, I figured out my issue.

                <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="SingleExpandedItem" 
                    Skin="Telerik" Width="100%" ExpandAnimation-Type="Linear" CollapseAnimation-Type="Linear">  
                    <Items> 
                        <telerik:RadPanelItem Text="Business For Sale Administration">  
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        asdf  
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem Text="Business Wanted Administration">  
                            <Items> 
                                <telerik:RadPanelItem> 
                                    <ItemTemplate> 
                                        asdf  
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelBar> 
Tags
PanelBar
Asked by
Chase Florell
Top achievements
Rank 1
Answers by
Chase Florell
Top achievements
Rank 1
Share this question
or