Item removed event

4 posts, 0 answers
  1. Alex
    Alex avatar
    54 posts
    Member since:
    Feb 2009

    Posted 09 Sep 2009 Link to this post

    Is there an event that triggers when Item is removed from selected files list, before upload, by clicking on X button.
    I am creating a Thumbnail gallery in FilesSelected event handler, and I want to remove thumbnails when an item (file) is removed from the selected list.

  2. Ivan
    Ivan avatar
    519 posts

    Posted 15 Sep 2009 Link to this post

    Hello Alex,

    Thank you for your interest in the RadUpload control.

    The current version does not fire an ItemDeleted event. In order to respect the item deletion you should implement a timer (DispatcherTimer) and on its Tick event to check the count of the uploader's items. Below is a sample code:

    int countUploadItems = 0; 
    DispatcherTimer myTimer; 
    this.myTimer = new System.Windows.Threading.DispatcherTimer(); 
    this.myTimer.Tick += this.MyTimerTick; 
    this.myTimer.Interval = TimeSpan.FromMilliseconds(999); 
    private void MyTimerTick(object sender, EventArgs e) 
        if (this.countUploadItems != this.radUpload.CurrentSession.ValidFiles.Count) 
            this.countUploadItems = this.radUpload.CurrentSession.ValidFiles.Count; 
            // put here your code to correct the image gallery. 

    We hope this information will help you.

    Best wishes,
    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.
  3. Joanna
    Joanna avatar
    6 posts
    Member since:
    Oct 2010

    Posted 16 Feb 2011 Link to this post

    Has there been any changes to this in later versions?
  4. Alex Fidanov
    Alex Fidanov avatar
    637 posts

    Posted 18 Feb 2011 Link to this post

    Hello Joanna,

     Currently, the RadUploadItem exposes the PreviewDelete and Delete routed events. The PreviewDelete event can be handled if you want to stop the item from being removed. Please note that these events are raised when the item is deleted through the UI (with the delete button of the RadUploadItem).

    Kind regards,
    Alex Fidanov
    the Telerik team
Back to Top