3 Answers, 1 is accepted
0
Hello Dave,
Creating a most recent documents list is a task which can depend on many things related to the application you develop. We do not have such an example since it would be nothing more that inserting items in the RadApplicationMenu items collection:
Also when this happens depends entirely on the design and organization of your application. For instance, you can insert items in this collection each time the user opens a document and you can keep track of the last 10 opened documents etc.
Regards,
Deyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Creating a most recent documents list is a task which can depend on many things related to the application you develop. We do not have such an example since it would be nothing more that inserting items in the RadApplicationMenu items collection:
RadMenuItem menuItem =
new
RadMenuItem();
menuItem.Text = @
"C:\Document.txt"
;
this
.radApplicationMenu1.RightColumnItems.Add(menuItem);
Also when this happens depends entirely on the design and organization of your application. For instance, you can insert items in this collection each time the user opens a document and you can keep track of the last 10 opened documents etc.
Regards,
Deyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Matt
Top achievements
Rank 1
answered on 20 Sep 2010, 08:44 PM
So I understand this, but how do you handle the click event for that item since it is being dynamically created? Usually I use the IDE to handle adding click events, I don't know how to do it for dynamically added items.
0
Hi Matt,
I hope this helps.
Peter
the Telerik team
Thanks for writing.
You should programmatically subscribe to the MouseClick event in this case:
Please refer to the code snipped below:
RadMenuItem menuItem =
new
RadMenuItem();
menuItem.Text = @
"C:\Document.txt"
;
menuItem.Click +=
new
EventHandler(menuItem_Click);
this
.radApplicationMenu1.RightColumnItems.Add(menuItem);
...
void
menuItem_Click(
object
sender, EventArgs e)
{
//do some operation with this Sender
if
(((RadMenuItem)sender).Text==@
"C:\Document.txt"
)
{
//open this file
}
}
I hope this helps.
Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items