Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Carousel > RadCarousel Removing An Item

Not answered RadCarousel Removing An Item

Feed from this thread
  • Posted on May 16, 2008 (permalink)

    I have put code into my application to remove an item from the carousel.  It removes it, but the item stays in view at the selected item position.  As I scroll around, the item is still there in the background.

    rCarFolders.Items.Remove(rCarFolders.SelectedItem)

    rCarFolders.Refresh()

    Help!

    Reply

  • Peter Peter admin's avatar

    Posted on May 17, 2008 (permalink)

    Hi Seth,

    Thank you for contacting us.

    I reproduced this issue. The following workaround removes the selected item correctly:

                if (this.radCarousel1.SelectedItem != null)
                {
                    RadItemCollection col = new RadItemCollection( this.radCarousel1.Items );
                    col.Remove((RadItem)this.radCarousel1.SelectedItem);
                    this.radCarousel1.Items.Clear();
                    this.radCarousel1.CarouselElement.BeginUpdate();
                    this.radCarousel1.Items.AddRange(col);
                    this.radCarousel1.CarouselElement.EndUpdate();
                 }

    Could you please check in your code that rCarFolders.SelectedItem is different from null?

    I believe this will help you. You can write me back if I could be of further help.
     

    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Posted on May 23, 2009 (permalink)

    Thanks for the workaround, it would be good to have this fixed at some point. I trust you have it logged as a defect? :)

    Inno Software Inc (www.innosoftware.net)

    Reply

  • Peter Peter admin's avatar

    Posted on May 25, 2009 (permalink)

    Hello Dylan,

    Thank you for contacting us.  We added the issue to our ToDo list. Extending the current behavior is not a simple task and hence I cannot give you a specific time frame about implementing it, however, the more people request that feature the higher its priority will be.

    Please excuse us for the introduced inconvenience.


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

  • Rafael Poggi avatar

    Posted on Sep 16, 2010 (permalink)

    Hello Peter,

    I have the same problem. The workaround works fine, it actually removes the item correctly. But since the .clear and .addrange methods are used, all remaining items  in the collection "fly" again  to an initial position in the carousel. Is is possible to avoid this effect and just remove the item without notice for the user?

    Thanks,
    Rafael Poggi

    Reply

  • Peter Peter admin's avatar

    Posted on Sep 21, 2010 (permalink)

    Hello Rafael Poggi,

    RadCarousel cannot remove an item without recalculation of the coordinates of the other items. e.g. animation cannot be avoided. To avoid visual glitches we do not allow removing single items. You should call

    radCarousel1.Items.Clear();
     
    and add all other items after that
     
    radCarousel1.Items.AddRange(myItems);

    Please, excuse us for the inconvenience.

    Kind regards,
    Peter
    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

    Reply

  • Rafael Poggi avatar

    Posted on Sep 21, 2010 (permalink)

    OK!

    Thanks,
    Rafael

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Carousel > RadCarousel Removing An Item
Related resources for "RadCarousel Removing An Item"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]