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

6 posts, 0 answers
  1. Son
    Son avatar
    22 posts
    Member since:
    Jun 2011

    Posted 22 Jun 2011 Link to this post

    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.
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 23 Jun 2011 Link to this post

    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
  3. DevCraft banner
  4. Son
    Son avatar
    22 posts
    Member since:
    Jun 2011

    Posted 23 Jun 2011 Link to this post

    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.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 28 Jun 2011 Link to this post

    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
  6. Son
    Son avatar
    22 posts
    Member since:
    Jun 2011

    Posted 28 Jun 2011 Link to this post

    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.
  7. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 30 Jun 2011 Link to this post

    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
Back to Top
DevCraft banner