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

[Solved] Postback ServerSide

2 Answers 160 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Bryan Page
Top achievements
Rank 1
Bryan Page asked on 14 Jul 2009, 04:19 PM
I want to know if the Telerik Menu has the ability to postback server side and be able to grab the event arguments
to determine what menu item was selected, then do something with it. 

Something similar to this code that their competitors have at CA.

As you can see.  It gets into the Event Arg, I pull the value I assigned in the HTML side, then determine where I want to go.

Is this possible?  Or something the same? 

private

void Menu1_ItemSelected(object sender, ComponentArt.Web.UI.MenuItemEventArgs e)

 

{

MenuItemSelected = e.Item.Value;

Session[

"MenuItemSelected"] = MenuItemSelected;

 

ChooseMenu();

 

}

2 Answers, 1 is accepted

Sort by
0
Bryan Page
Top achievements
Rank 1
answered on 14 Jul 2009, 06:50 PM
I got a little closer here.....I found the code for the event click side

Private Sub editMenu_ItemClick(ByVal sender As Object, ByVal e As RadMenuEventArgs) 
     If e.Item.Text = "Edit" Then 
         'redirect page 
     ElseIf e.Item.Text = "Delete" Then 
         ' redirect page 
     End If 
 End Sub 


I just need to get the onclick to actual find my editMenu_ItemClick Sub........any ideas? 

I will CONTINUE to sift through all these boards to find an answer.  Looking for something in Page Load that will allow the onlick
to find my Sub
0
Bryan Page
Top achievements
Rank 1
answered on 15 Jul 2009, 01:13 PM
Ok, I finally figured it out.   Just wanting to post my findings.

The key here is to list the Method in the property of the control Menu

OnItemClick

="RadMenu1_ItemClick"

then that fires the event and you can handle the code as e.Item.Value or whatever you want to use.


B

 

Tags
Menu
Asked by
Bryan Page
Top achievements
Rank 1
Answers by
Bryan Page
Top achievements
Rank 1
Share this question
or