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

[Solved] Login from within a menu item template

1 Answer 145 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 31 Mar 2009, 10:02 PM
Hi

I am tearing my hair out over this... help needed (to solve the problem, that is, not to tear
any more hair out!)

I have a RadMenu where one of the buttons has an item template as the only sub menu item.
This contains a RadAjaxPanel containing 2 text boxes and an image button.

I am having trouble getting the button click to trigger the relevant sub,
although if I pull the panel out of the menu onto a blank area of the page
it works.

One thing I noticed is that in Visual Web Developer  design view, the 'lightening bolt' does
not appear for the button when the panel is inside the menu template, so I can't double click it to
create the onclick event handler, so I had to type it by hand.

I did manage to 'find' the button and change its parameters, and 'found' the panel
the same way. eg
Dim buttonItem2 As RadMenuItem = RadMenu2.FindItemByText("CellarClub")  
        Dim MemberInfo As ImageButton = DirectCast(buttonItem2.FindControl("MemberInfo"), ImageButton)  
        MemberInfo.Attributes.Add("onmouseover""src='" & ResolveClientUrl("images/buttons/rt-arrow-over-grey.gif") & "'"

Obviously I am missing something.. Please help me out!

Or am I trying to do something that can't be done?

Thanks

Clive

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 02 Apr 2009, 02:56 PM
i Clive,

Please find attached a simple project which shows how you can trigger a button located in an item template. Download it and examine it.

If you have any questions, do not hesitate to contact us again.

Greetings,
Yana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or