Skip to content

Update Selection of DataGrid.xml #2814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xml/System.Windows.Controls/DataGrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
You can use the <xref:System.Windows.Controls.DataGrid.Columns%2A> collection to programmatically add, insert, remove, and change any columns in the control at run time. Check the <xref:System.Windows.Controls.DataGridColumn.IsAutoGenerated%2A> property to determine whether a column is auto generated or user defined. Auto-generated columns will be automatically added, removed, or regenerated when the <xref:System.Windows.Controls.ItemsControl.ItemsSource%2A> changes.

## Selection
By default, the entire row is selected when a user clicks a cell in a <xref:System.Windows.Controls.DataGrid>, and a user can select multiple rows. You can set the <xref:System.Windows.Controls.DataGrid.SelectionMode%2A> property to specify whether a user can select cells, full rows, or both. Set the <xref:System.Windows.Controls.DataGrid.SelectionUnit%2A> property to specify whether multiple rows or cells can be selected, or only single rows or cells.
By default, the entire row is selected when a user clicks a cell in a <xref:System.Windows.Controls.DataGrid>, and a user can select multiple rows. You can set the <xref:System.Windows.Controls.DataGrid.SelectionUnit%2A> property to specify whether a user can select cells, full rows, or both. Set the <xref:System.Windows.Controls.DataGrid.SelectionMode%2A> property to specify whether multiple rows or cells can be selected, or only single rows or cells.

You can get information about the cells that are selected from the <xref:System.Windows.Controls.DataGrid.SelectedCells%2A> property. You can get information about cells for which selection has changed in the <xref:System.Windows.Controls.SelectedCellsChangedEventArgs> of the <xref:System.Windows.Controls.DataGrid.SelectedCellsChanged> event. Call the <xref:System.Windows.Controls.DataGrid.SelectAllCells%2A> or <xref:System.Windows.Controls.DataGrid.UnselectAllCells%2A> methods to programmatically select or unselect all cells. For more information, see [Default Keyboard and Mouse Behavior in the DataGrid Control](~/docs/framework/wpf/controls/default-keyboard-and-mouse-behavior-in-the-datagrid-control.md).

Expand Down Expand Up @@ -5879,4 +5879,4 @@
</Docs>
</Member>
</Members>
</Type>
</Type>