DataGridRowDetailsVisibilityMode Enumeration
Specifies constants that define when DataGrid row details are displayed.
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
This enumeration is used by the DataGrid.RowDetailsVisibilityMode property. You can programmatically show or hide the row details section for individual rows by setting the row DetailsVisibility property.
The following code example demonstrates how to use the DataGridRowDetailsVisibilityMode enumeration. This example is part of a larger example available in the How to: Display and Configure Row Details in the DataGrid Control topic.
' Set the row details visibility to the option selected in the combo box. Private Sub cbRowDetailsVis_SelectionChanged(ByVal sender As System.Object, ByVal e As System.Windows.Controls.SelectionChangedEventArgs) Dim cb As ComboBox = sender Dim cbi As ComboBoxItem = cb.SelectedItem If Me.dataGrid1 IsNot Nothing Then If cbi.Content.ToString() = "Selected Row (Default)" Then Me.dataGrid1.RowDetailsVisibilityMode = DataGridRowDetailsVisibilityMode.VisibleWhenSelected ElseIf cbi.Content.ToString() = "None" Then Me.dataGrid1.RowDetailsVisibilityMode = DataGridRowDetailsVisibilityMode.Collapsed ElseIf cbi.Content.ToString() = "All" Then Me.dataGrid1.RowDetailsVisibilityMode = DataGridRowDetailsVisibilityMode.Visible End If End If End Sub
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.