DataGridSelectionMode Enumeration
Specifies constants that define the DataGrid selection modes.
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
This enumeration is used by the DataGrid.SelectionMode property. You can programmatically allow single or multiple row selection by setting the DataGrid.SelectionMode property.
The following code example demonstrates how to use the DataGridSelectionMode enumeration. This example is part of a larger example available in the Walkthrough: Customizing the DataGrid Control Using Properties topic.
Private Sub cbSelectionMode_Changed(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Dim cb As CheckBox = sender If Me.dataGrid1 IsNot Nothing Then If cb.IsChecked = True Then Me.dataGrid1.SelectionMode = DataGridSelectionMode.Single ElseIf cb.IsChecked = False Then Me.dataGrid1.SelectionMode = DataGridSelectionMode.Extended 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.