DataGrid.NavigateTo Method (Int32, String)

 

Navigates to the table specified by row and relation name.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public void NavigateTo(
	int rowNumber,
	string relationName
)

Parameters

rowNumber
Type: System.Int32

The number of the row to navigate to.

relationName
Type: System.String

The name of the child relation to navigate to.

The following code example navigates to the specified row number, in the table specified by child relationship name.

private void NavToGrid(System.Windows.Forms.DataGrid dataGrid)
{
    // Presumes a relationship named OrderDetails exists.
    dataGrid.NavigateTo(2, "OrderDetails");
}

.NET Framework
Available since 1.1
Return to top
Show: