RadListView auto scrolls to the end

6 posts, 0 answers
  1. Sacha
    Sacha avatar
    10 posts
    Member since:
    May 2012

    Posted 30 May 2012 Link to this post

    I have multiple horizontal RadListViews on a user control. These RadListViews have ListViewDataItems dynamically added to them. When all the items have been added, by default the RadListView has scrolled to the end, ie. all the way to the right.

    How do I prevent this or set the scroll bar to the start?

  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 31 May 2012 Link to this post

    Hello Sacha,

    Thank you for your question.

    When you add a new item to RadListView, it becomes current in its data source and RadListView synchronized with it. To prevent the synchronization, you can use the BeginUpdate/EndUpdate method when adding new items:
    this.radListView1.BeginUpdate();
    this.radListView1.Items.Add("New Item");
    this.radListView1.EndUpdate();

    I hope this helps. In case you have any additional questions, do not hesitate to ask.

    Greetings,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sacha
    Sacha avatar
    10 posts
    Member since:
    May 2012

    Posted 31 May 2012 Link to this post

    worked perfectly, thanks.
  5. Andrey
    Andrey avatar
    5 posts
    Member since:
    Jul 2012

    Posted 24 Jan 2014 Link to this post

    Hi!

    How can I scroll ListView to the specific Item, where listView.ViewType= ListViewType.ListView?
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 24 Jan 2014 Link to this post

    Hi Andrey,

    Thank you for writing.

    To scroll to a specific item in RadListView you can use the ScrollToItem method of the Scroller:
    radListView1.ListViewElement.ViewElement.Scroller.ScrollToItem(radListView1.Items[33]);

    Your question does not seem to be related to the initial subject of the thread, hence I would like to kindly ask you to separate the questions that are not related to each other in separate thread. Thank you for the understanding.

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  7. Andrey
    Andrey avatar
    5 posts
    Member since:
    Jul 2012

    Posted 24 Jan 2014 Link to this post

    Hi, sorry i was looking topic by keywords. I will keep your advice and separate questions by threads relatively.

    Your solution works, thanks!
Back to Top
UI for WinForms is Visual Studio 2017 Ready