DataGridSelectionMode 列舉

定義

定義常數,以指定 DataGrid 控制項支援單一項目還是多個項目選取。Defines constants that specify whether single or multiple item selections are supported by a DataGrid control.

public enum class DataGridSelectionMode
public enum DataGridSelectionMode
type DataGridSelectionMode = 
Public Enum DataGridSelectionMode
繼承
DataGridSelectionMode

欄位

Extended 1

可以同時選取 DataGrid 中的多個項目。Multiple items in the DataGrid can be selected at the same time.

Single 0

一次只能選取 DataGrid 中的一個項目。Only one item in the DataGrid can be selected at a time.

備註

和屬性會一起決定使用者可以在中選取專案的方式。 DataGrid DataGrid.SelectionMode DataGrid.SelectionUnitThe DataGrid.SelectionMode and DataGrid.SelectionUnit properties together determine how users can select items in a DataGrid. 例如DataGrid.SelectionMode , 如果DataGridSingle , 而DataGrid.SelectionUnitDataGridSelectionUnit.Cell, 則使用者可以在中一次選取一個資料格。For example, if the DataGrid.SelectionMode is Single and the DataGrid.SelectionUnit is DataGridSelectionUnit.Cell, the user can select one cell at a time in the DataGrid.

Extended [模式] 中選取多個專案, 方法是按住 SHIFT 鍵以從錨點或 CTRL 鍵擴充選取範圍, 以個別選取其他專案。In Extended mode, select multiple items by holding down the SHIFT key to extend the selection from an anchor point or the CTRL key to individually select additional items.

適用於

另請參閱