locked
How to show the specified item in Listview RRS feed

  • General discussion

  • For example. There're 5 items(A, B, C, D, E) in the ListView

    Because the width of item is big, so there's scrollbar and the window can show only 3 items.

    I want to make 5 buttons. So when press button B, item A B C will be show in the window. When press button D, item C,D,E will show in the window.

    And you still can scroll the bar to other item after that.

    Is there any solution for this issue?


    Here's a similar and simple project: 

    ?mkt=en-US#cid=2CFA8ECE0D79112C&id=2CFA8ECE0D79112C%21105

    (please add skydrive's link before this)

    The three pics in the same folder shows what I expect. I hope when I click the button,  the listview will update the display of items. For example, when I click button(Group titile 4), then the group title 4 item will be displayed in the left side of the listview, and I can press the scrollbar to left to show group title (1-3) item 

    Thank you!


    Monday, August 26, 2013 3:57 PM

All replies

  • What have you done so far and where exactly are you stuck? Can you share your attempt to solve your issue (your test project) via SkyDrive?

    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    Wednesday, August 28, 2013 1:22 AM
    Moderator
  • Hi,  Prashant

    Thank you for reply. Here's a similar and simple project: 

    ?mkt=en-US#cid=2CFA8ECE0D79112C&id=2CFA8ECE0D79112C%21105

    (please add skydrive's link before this)

    The three pics in the same folder shows what I expect. I hope when I click the button,  the listview will update the display of items. For example, when I click button(Group titile 4), then the group title 4 item will be displayed in the left side of the listview, and I can press the scrollbar to left to show group title (1-3) item 

    Thank you!


    • Edited by philiafzy Friday, August 30, 2013 3:45 PM add link
    Friday, August 30, 2013 3:43 PM
  • Hi,

    You can use the listView.ensureVisible method to get the listView to automatically scroll to an item.
    Link to MSDN reference: http://msdn.microsoft.com/en-us/library/windows/apps/br211820.aspx

    Sunday, September 1, 2013 12:26 PM
  • Thank you! It works.
    Sunday, September 1, 2013 4:45 PM