MobileForms Toolkit Documentation

AdvancedList.ActiveRowIndex Property

Gets or sets the active row index.

public int ActiveRowIndex {get; set;}

Property Value

The active row index, or -1 if none is active.

Remarks

Active row is the row that was last selected.

Example

The following sample demonstrates how to utilize keys in navigation:

[Visual Basic]

Private Sub AdvancedList1_KeyDown(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.KeyEventArgs) Handles AdvancedList1.KeyDown
    
    If e.KeyCode = Keys.Up Then
        AdvancedList1.ActiveRowIndex = AdvancedList1.ActiveRowIndex - 1
    Else If e.KeyCode = Keys.Down Then
        AdvancedList1.ActiveRowIndex = AdvancedList1.ActiveRowIndex + 1
    End If
End Sub
            
[C#]

private void advancedList1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
    if (e.KeyCode == Keys.Up)
        advancedList1.ActiveRowIndex--;
    else if (e.KeyCode == Keys.Down)
        advancedList1.ActiveRowIndex++;
}
            

See Also

AdvancedList Class | Resco.Controls.AdvancedList Namespace