Set top most item

2 posts, 1 answers
  1. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 27 May 2010 Link to this post

    I have a carousel that is using a ListCollectionView of a "CutomObject" List as ItemsSource ( for filtering purpose I need it this way )
    Every time the user creates a new CustomObject, I make a refresh setting again the ItemSource of this carousel, with this new object in it.

    view = new ListCollectionView( LayoutCapturer.GetSavedLayouts() ); 
                view.Filter = FilterObject; 
                this.carousel.ItemsSource = view; 
                this.carouselPanel.ItemsPerPage = ( carousel.Items.Count < 15 ) ? 
                    ( ( carousel.Items.Count % 2 == 0 ) ? carousel.Items.Count - 1 : carousel.Items.Count ) : 15; 

    But at this point I need that the top most element of the carousel to be the CustomObject I've just created.
    Is that possible?

    Thank you!

  2. Answer
    Maya avatar
    4062 posts

    Posted 31 May 2010 Link to this post

    Hello RoxanaC,

    You may use the method BringDataItemIntoView and set as a parameter the newly-added item. For example:

    I hope that helps.

    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 R3 2016 release webinar banner
Back to Top