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

How can I catch event of "Cancel" button in File Open Dialog

5 Answers 119 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Son
Top achievements
Rank 1
Son asked on 22 Jun 2011, 12:52 PM
When I click "Browse" button in RadUpload control, the control will shows File Open Dialog
I want to catch the Cancel button event to do something when user click on it.
How can I do that ?
Please help me.

5 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 23 Jun 2011, 08:33 AM
Hello Son,

You can create a DelegateCommand and do something in its Execute method and then call RadUpload.CancelUpload(). This command, you can set to the RadUpload.CancelCommand property, and the command will be triggered when the Cancel button is pressed.

Greetings,
Alex Fidanov
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
0
Son
Top achievements
Rank 1
answered on 23 Jun 2011, 09:11 AM
Hi Alex
Thanks for your repply. I dont know how to create DelegateCommand. Can you give me the example or attachment of project.I am newbie with telerik control.
Please help me.
0
Tina Stancheva
Telerik team
answered on 28 Jun 2011, 04:10 PM
Hi Son,

I attached a sample illustrating Alex's suggestion. The Telerik DelegateCommand provides a simple ICommand implementation. If you need more info about implementing command binding in Silverlight, you can have a look at this article.

Regards,
Tina Stancheva
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
0
Son
Top achievements
Rank 1
answered on 29 Jun 2011, 03:56 AM
Hi Tina
Thank you for your repply.
I was talking about "Cancel" button in File Open Dialog which is showed when you click on "Browse" button in RadUpload control. Maybe we have a confusion about this. And I apologize about that confusion.
Please help me again.
0
Alex Fidanov
Telerik team
answered on 30 Jun 2011, 01:11 PM
Hi Son,

There is nothing exposed for the cancel button of the open file dialog. The upload control will only prepare files when the file dialog returns positive result.

Kind regards,
Alex Fidanov
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
Tags
Upload
Asked by
Son
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Son
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or