I have scenario where I need to fire Cancel upload, Upload ,Clear Upload Items programmatically i.e with out user interaction.
How can we do this?
How can we catch "Clear" Button events..?
Will be great if you can give mvvm sample ..for above..
3 Answers, 1 is accepted
0
Petar Mladenov
Telerik team
answered on 27 Feb 2012, 03:11 PM
Hi Sunny ,
I am not sure I understand your scenario correctly. Do you need programmatic upload (without using the default Upload interface), or you need particular events ? If first, please check out the following articles and posts and let us know if they help you; Programmatic Upload How to Use RadUpload Programatically
I believe I've answered to your other question in other threads (how to use the Upload events in MVVM scenario) - with Galasoft MVMM Light's EventToCommand behavior.
Please let us know if you have further questions.
Kind regards,
Petar Mladenov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
I can not find any thing for "ClearButton".I need control button so that I can take some other action also.
0
Petar Mladenov
Telerik team
answered on 01 Mar 2012, 05:26 PM
Hello Sunny,
You can use the Loaded event of the RadUpload. In it you can access the ClearButton like so:
Button clearButton= this.radUpload.ChildrenOfType<Button>().Where( b => b.Name.Equals( "ClearButton" ) ).FirstOrDefault();
If the method ChildrenOftype returns null, please try running this code block in Dispatcher.BeginInvoke({});
Once accessed, you can attach to the Click event like so:
cancelButton.Click += new RoutedEventHandler(cancelButton_Click);