locked
How to change the selected index of a flipview in winjs?

    Question

  • Hi,

         Am trying to change the index of WinJS.UI.FlipView. I tried using SelectedIndex, but couldn't achieve it.

    var flipviewctrl = document.getElementById("basicFlipView");
                flipviewctrl.SelectedIndex = 2;

            

    Tuesday, June 11, 2013 2:19 PM

Answers

  • Hi,

    Try changing the currentPage attribute (zero based array).

    document.getElementById("basicFlipView").winControl.currentPage = 4;//goes to the 5th image
    Keep in mind that the value needs to be a valid index.


    • Marked as answer by raja124 Wednesday, June 12, 2013 6:47 AM
    Tuesday, June 11, 2013 3:33 PM

All replies

  • Hi,

    Try changing the currentPage attribute (zero based array).

    document.getElementById("basicFlipView").winControl.currentPage = 4;//goes to the 5th image
    Keep in mind that the value needs to be a valid index.


    • Marked as answer by raja124 Wednesday, June 12, 2013 6:47 AM
    Tuesday, June 11, 2013 3:33 PM
  • Thanks that works..
    Wednesday, June 12, 2013 6:47 AM