locked
How to make an item in the selected state in a grid list view?

    Question

  • Dear all,

    Is there a way to make an item in "selected" state? For a grid list view, if there are items in it, we could use the up/down/left/right arrow from the keyboard and we could see that there would be a rectangle on the selected item. But could we achieve this in code? In JS code, we could do this by changing the property "currentItem" of the grid view.

    Thank you very much.

    Wednesday, October 09, 2013 6:28 AM

All replies

  • there's

    GridView->SelectedIndex = 0;

    or

    GridView->SelectedIndex = //...

    that's what you are looking for?
    Wednesday, October 09, 2013 12:05 PM
  • Hi, ch.b,

    Thank you very much for your reply. I've tried this way but it doesn't work...

    Thursday, October 10, 2013 12:55 PM
  • Check if the SelectionMode is not set to None;)
    Sunday, October 13, 2013 8:47 PM
  • Yeah, Ciamas, SelectionMode is set None. Does this make the trouble? Thanks.

    Even if it is set as None, I could use the left/right/up/down arrow on the keyboard to select item.

    Monday, October 14, 2013 10:57 AM
  • Hi, Ciamas,

    Set the SelectionMode to Single doesn't meet my needs, and I must set it to none.

    Please be noted that even it is set to None, and if we use the left/right/up/down arrow from keyboard, we could still see that the item in the list view is will be enclosed by a rectangle. What I want is just such effect. But I couldn't find any way to achieve this in C++. But in JS we could do this by changing the property "currentItem" of the view.

    Friday, October 18, 2013 9:06 AM