DataGridSelectionUnit 列舉

定義

定義常數,指定在 DataGrid 控制項中使用儲存格、資料列還是兩者來進行選取。

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

欄位

Cell 0

只能選取儲存格。 按一下儲存格會選取該儲存格。 按一下資料列或資料行標題不會執行任何動作。

CellOrRowHeader 2

可選取儲存格和資料列。 按一下儲存格只會選取該儲存格。 按一下資料列標題會選取整個資料列。

FullRow 1

只能選取整個資料列。 按一下儲存格或資料列標題會選取整個資料列。

備註

DataGrid.SelectionUnit 屬性會 DataGrid.SelectionMode 一起決定使用者如何選取 中的 DataGrid 專案。 例如,如果 DataGrid.SelectionModeDataGridSelectionMode.SingleDataGrid.SelectionUnitCell ,則使用者可以一次在 中 DataGrid 選取一個資料格。

適用於

另請參閱