Table of Contents

Method SetSelected

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SetSelected(long, bool)

Selects or clears the selection for the specified item in a ListView.

public void SetSelected(long index, bool value)

Parameters

index long

The zero-based index of the item in a ListView to select or clear the selection for.

value bool

true to select the specified item; otherwise, false.

Remarks

You can use this method to set the selection of items in a multiple-selection ListView. To select an item in a single-selection ListView, use the SelectedIndex property.

Exceptions

ArgumentOutOfRangeException

The specified index was outside the range of valid values.