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

[Solved] RadWindow from RadMenu Click

1 Answer 139 Views
Menu
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 06 Apr 2009, 02:25 AM
This should be a pretty straight-forward answer. How do I use the RadMenu itemTemplate without completely breaking the skin part of the RadMenu? I ask this because I have found the only way to click to a RadWindow to be this way (so far...)

        <telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="dsBranch"   
            DataTextField="Branch_Name"  Flow="Vertical" Skin="Forest">  
            <ItemTemplate> 
                <href="#" onclick="openRadWindow('<%# DataBinder.Eval(Container.DataItem, "Branch_ID") %>'); return false;"><%# DataBinder.Eval(Container.DataItem, "Branch_Name") %></a>  
            </ItemTemplate> 
        </telerik:RadMenu> 

The above WORKS perfectly, but it completely kills the Forest skin. Is there a better way to do the same thing?

My RadWindow and DataSource are set up correctly, so I leave them out of this post to avoid confusion.

I want to do exactly the same thing as above while keeping the beauty of Telerik skins. How can I do that? Anyone can answer. Thank you.

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 06 Apr 2009, 04:59 AM
Nevermind. Here is how.

The JavaScript:

function openRadWindow(sender, eventArgs) {  
      
        var Branch_ID = eventArgs.get_item().get_value();  
        var oWnd = radopen("BilletCharts.aspx?BranchID=" + Branch_ID, "RadWindow1");  
        oWnd.Center();  
              

The RadMenu:

<telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="dsBranch"   
OnClientItemClicked="openRadWindow" DataValueField="Branch_ID"   
DataTextField="Branch_Name" Flow="Vertical" Skin="Forest" /> 
Tags
Menu
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or