RadListBox Items - Backgroundworker - ReportProgress

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 10 Sep 2014 Link to this post


    i add some Messages to a RadListBox in codebehind, using a Backgroundworker. If i start my application all ist fine.
    But if i cklick on a button which starts the void again, i get all messages twice.

    How can ein clear or remove all the items of my RadListBox before i start again?

    radlistbos.Items.Clear(); - does not work

    Or is there a  way to clear the Backgroundworker ReportProgress?

    Thanks a lot
    Best Regards
  2. Polya
    Polya avatar
    191 posts

    Posted 12 Sep 2014 Link to this post

    Hi Rene,

    In order to clear the Items from the RadListBox we can clear the ViewModel's collection that the RadListBox.ItemsSource is bound to. I've attached a sample project demonstrating this approach.

    If the proposed way is not suitable for your scenario or it does not resolve the issue I would like to ask you for a project or code sample that demonstrates the problem in order for us to investigate and help you further.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft banner
Back to Top