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);
One of the DataGridNavigationModes values which include None, AllowChildNavigation, AllowParentNavigation, and Both. The default is Both.
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.
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
DataGrid Class | DataGrid Members | System.WinForms Namespace