NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.NavigationMode

Gets or sets a value that specifies which links are shown and in what context.

[Visual Basic]
Public Property NavigationMode As DataGridNavigationModes
[C#]
public DataGridNavigationModes NavigationMode {get; set;}
[C++]
public: __property DataGridNavigationModes get_NavigationMode();
public: __property void set_NavigationMode(DataGridNavigationModes);
[JScript]
public function get NavigationMode() : DataGridNavigationModes;
public function set NavigationMode(DataGridNavigationModes);

Property Value

One of the DataGridNavigationModes values which include None, AllowChildNavigation, AllowParentNavigation, and Both. The default is Both.

Remarks

If this property is set to None, then no links are shown. If it is set to AllowChildNavigation, the links to child tables are shown. If set to AllowParentNavigation, links to parent tables are shown.

Example [Visual Basic]

The following example toggles the NavigationMode property between the default None and AllowChildNavigation.

[Visual Basic]

Private Sub SetNavMode(ByRef myGrid As DataGrid)
   If myGrid.NavigationMode = DataGridNavigationModes.None Then
      myGrid.NavigationMode = DataGridNavigationModes.AllowChildNavigation
   Else
      myGrid.NavigationMode = DataGridNavigationModes.None
   End If
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace