Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menu Items
Message
De
23/09/2004 13:12:50
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00945353
Message ID:
00945438
Vues:
23
Shawn,

In the AfterSelect EventHandler for the TreeView, you can determine which TreeNode was selected and process accordingly.

~~Bonnie



>Another question in regards to this code.
>
>I will have it adding nodes based on the menu.
>When a user clicks on the node I want it to run the same event code that is in place for the menu.
>
>How can i do this?
>
>similiar to this : I hand coded the below event.
>
>		private void button1_Click(object sender, System.EventArgs e)
>		{
>			this.FileLocalizeSetupBar_Click(sender, e);
>		}
>
>
>
>
>
>>Hi, Shawn,
>>
>>Here's a code sample. This assumes your main menu is called "mainMenu1". It will loop through the menu pad pulldowns from left to right, and display the name of each pad along with the name of all the menu items for each pad.
>>
>>
>>foreach(MenuItem oMenuPad in  this.mainMenu1.MenuItems)
>>{
>>	MessageBox.Show("Menu Pad is " + oMenuPad.Text);
>>	foreach(MenuItem oMenuItem in oMenuPad.MenuItems)
>>		   MessageBox.Show("Menu Item for this pad is " + oMenuItem.Text);
>>}
>>
>>
>>Hope that helps...
>>Kevin
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform