views:

36

answers:

2

Hi

I have a ListView in VirtualMode.

I need a way to set focus to specific item.

The FocusedItem is not good for the VirtualMode, I need a way to set FocusedIndex or something like that, but didn't see any property like that.

Thanks.

+1  A: 

You have to set the Focused property on the ListViewItem directly.

So, to set the 11th row to be focused:

this.lvVirtual.Items[10].Focused = true;
Grammarian
A: 

As it has been said ListView is in VirtualMode. Items collection is not accessible here.

Try to raise an event VirtualItemsSelectionRangeChanged

Alex