Class SfGridBase
Implements
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class SfGridBase : Control, IDisposable
Constructors
SfGridBase()
Declaration
public SfGridBase()
Fields
AllowDraggingColumnsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowDraggingColumns dependency property.
Declaration
public static readonly DependencyProperty AllowDraggingColumnsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowDraggingColumns dependency property.
AllowEditingProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowEditing dependency property.
Declaration
public static readonly DependencyProperty AllowEditingProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowEditing dependency property.
AllowResizingColumnsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowResizingColumns dependency property.
Declaration
public static readonly DependencyProperty AllowResizingColumnsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowResizingColumns dependency property.
AllowResizingHiddenColumnsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowResizingHiddenColumns dependency property.
Declaration
public static readonly DependencyProperty AllowResizingHiddenColumnsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowResizingHiddenColumns dependency property.
AllowSelectionOnPointerPressedProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowSelectionOnPointerPressed dependency property.
Declaration
public static readonly DependencyProperty AllowSelectionOnPointerPressedProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowSelectionOnPointerPressed dependency property.
AllowSortingProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowSorting dependency property.
Declaration
public static readonly DependencyProperty AllowSortingProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowSorting dependency property.
AllowTriStateSortingProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowTriStateSorting dependency property.
Declaration
public static readonly DependencyProperty AllowTriStateSortingProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AllowTriStateSorting dependency property.
AutoGenerateColumnsForCustomTypeProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.AutoGenerateColumnsForCustomType dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateColumnsForCustomTypeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.AutoGenerateColumnsForCustomType dependency property.
AutoGenerateColumnsModeForCustomTypeProperty
Identifies the AutoGenerateColumnsModeForCustomType dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateColumnsModeForCustomTypeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AutoGenerateColumnsModeForCustomType dependency property.
AutoGenerateColumnsModeProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AutoGenerateColumnsMode dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateColumnsModeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AutoGenerateColumnsMode dependency property.
AutoGenerateColumnsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.AutoGenerateColumns dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateColumnsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.AutoGenerateColumns dependency property.
CellTemplateSelectorProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.CellTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty CellTemplateSelectorProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.CellTemplateSelector dependency property.
CurrentCellBorderBrushProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.CurrentCellBorderBrush dependency property.
Declaration
public static readonly DependencyProperty CurrentCellBorderBrushProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.CurrentCellBorderBrush dependency property.
CurrentCellBorderThicknessProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.CurrentCellBorderThickness dependency property.
Declaration
public static readonly DependencyProperty CurrentCellBorderThicknessProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.CurrentCellBorderThickness dependency property.
EditorSelectionBehaviorProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.EditorSelectionBehavior dependency property.
Declaration
public static readonly DependencyProperty EditorSelectionBehaviorProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.EditorSelectionBehavior dependency property.
EditTriggerProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.EditTrigger dependency property.
Declaration
public static readonly DependencyProperty EditTriggerProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.EditTrigger dependency property.
FooterColumnCountProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.FooterColumnCount dependency property.
Declaration
public static readonly DependencyProperty FooterColumnCountProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.FooterColumnCount dependency property.
FrozenColumnCountProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.FrozenColumnCount dependency property.
Declaration
public static readonly DependencyProperty FrozenColumnCountProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.FrozenColumnCount dependency property.
GridCopyOptionProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.GridCopyOption dependency property.
Declaration
public static readonly DependencyProperty GridCopyOptionProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.GridCopyOption dependency property.
GridPasteOptionProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.GridPasteOption dependency property.
Declaration
public static readonly DependencyProperty GridPasteOptionProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.GridPasteOption dependency property.
GridValidationModeProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.GridValidationMode dependency property.
Declaration
public static readonly DependencyProperty GridValidationModeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.GridValidationMode dependency property.
HeaderContextMenuProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.HeaderContextMenu dependency property.
Declaration
public static readonly DependencyProperty HeaderContextMenuProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.HeaderContextMenu dependency property.
HeaderRowHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.HeaderRowHeight dependency property.
Declaration
public static readonly DependencyProperty HeaderRowHeightProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.HeaderRowHeight dependency property.
IsReadOnlyProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.IsReadOnly dependency property.
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.IsReadOnly dependency property.
NavigationModeProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.NavigationMode dependency property.
Declaration
public static readonly DependencyProperty NavigationModeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.NavigationMode dependency property.
RecordContextMenuProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.RecordContextMenu dependency property.
Declaration
public static readonly DependencyProperty RecordContextMenuProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.RecordContextMenu dependency property.
RowHeaderWidthProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.RowHeaderWidth dependency property.
Declaration
public static readonly DependencyProperty RowHeaderWidthProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.RowHeaderWidth dependency property.
RowHeightProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.RowHeight dependency property.
Declaration
public static readonly DependencyProperty RowHeightProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.RowHeight dependency property.
SelectedIndexProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedIndex dependency property.
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedIndex dependency property.
SelectedItemProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedItem dependency property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedItem dependency property.
SelectedItemsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedItems dependency property.
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectedItems dependency property.
SelectionModeProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectionMode dependency property.
Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SelectionMode dependency property.
ShowRowHeaderProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.ShowRowHeader dependency property.
Declaration
public static readonly DependencyProperty ShowRowHeaderProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.ShowRowHeader dependency property.
ShowSortNumbersProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.ShowSortNumbers dependency property.
Declaration
public static readonly DependencyProperty ShowSortNumbersProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.ShowSortNumbers dependency property.
ShowToolTipProperty
Identifies the ShowToolTip dependency property.
Declaration
public static readonly DependencyProperty ShowToolTipProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ShowToolTip dependency property.
SortClickActionProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SortClickAction dependency property.
Declaration
public static readonly DependencyProperty SortClickActionProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SortClickAction dependency property.
SortColumnDescriptionsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfDataGrid.SortColumnDescriptions dependency property.
Declaration
public static readonly DependencyProperty SortColumnDescriptionsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfDataGrid.SortColumnDescriptions dependency property.
StackedHeaderRowsProperty
Identifies the Syncfusion.UI.Xaml.Grid.SfGridBase.StackedHeaderRows dependency property.
Declaration
public static readonly DependencyProperty StackedHeaderRowsProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Syncfusion.UI.Xaml.Grid.SfGridBase.StackedHeaderRows dependency property.
Properties
AllowDraggingColumns
Gets or sets a value that indicates whether the column can be repositioned by using mouse or touch.
Declaration
public bool AllowDraggingColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the column is repositioned by using mouse or touch; otherwise , false .The default value is false. |
Remarks
The dragging operation can be customized through QueryColumnDragging event handler in SfDataGrid.
AllowEditing
Gets or sets a value that indicates whether the user can edit the cells.
Declaration
public bool AllowEditing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if user can edit the cells; otherwise, false. The default value is false. |
Remarks
CurrentCellBeginEdit and CurrentCellEndEdit events occurs when editing starts for current cell and editing ends for current cell.
AllowResizingColumns
Gets or sets a value that indicates whether the user can adjust the column width by using the mouse.
Declaration
public bool AllowResizingColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the columns are allowed for resizing;otherwise,false.The default value is false. |
Remarks
You can cancel or customize the resizing operations through ResizingColumns event handler.
AllowResizingHiddenColumns
Gets or sets a value that indicates whether the hidden column can be resized using the mouse.
Declaration
public bool AllowResizingHiddenColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the resizing can be enabled for the hidden columns in SfDataGrid; otherwise,false. The default value is false. |
AllowSelectionOnPointerPressed
Gets or sets a value that indicates whether the selection should be present in the PointerPressed state.
Declaration
public bool AllowSelectionOnPointerPressed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the row or cell is selected in PointerPressed; otherwise , false. The default value is false. |
AllowSorting
Gets or sets a value that indicates whether the user can sort the data by clicking on its header cell of the column in SfDataGrid.
Declaration
public bool AllowSorting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the sorting is enabled ; otherwise, false. The default value is true. |
Remarks
The SortColumnsChanging and SortColumnsChanged events occurs , when the sorting operation is performed. You can cancel or customize the sorting operation through SortColumnsChanging event handler.
AllowTriStateSorting
Gets or sets a value that indicates whether the user can sort the data to its initial order other than ascending or descending order.
Declaration
public bool AllowTriStateSorting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the data is arranged to initial order; otherwise, false. The default value is false. |
AutoGenerateColumns
Gets or sets a value that indicates whether the columns should be created automatically.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the columns are automatically generated; otherwise , false. The default value is true. |
Remarks
Each column gets notified in the AutoGeneratingColumn event during its creation. You can cancel or customize the column being created by using this event.
AutoGenerateColumnsForCustomType
Gets or sets a value that indicates whether to generate columns automatically for the custom types in data object.
Declaration
public bool AutoGenerateColumnsForCustomType { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the custom type properties are automatically generated; otherwise , false. The default value is false. |
Remarks
Setting AutoGenerateColumnsForCustomType to true, generate columns for inner properties.For example, OrderInfo class has Customer property of type Customer, then column generated like Customer.CustomerID.
AutoGenerateColumnsMode
Gets or sets a value that indicates how the columns are generated during automatic column generation.
Declaration
public AutoGenerateColumnsMode AutoGenerateColumnsMode { get; set; }
Property Value
Type | Description |
---|---|
AutoGenerateColumnsMode | One of the AutoGenerateColumnsMode enumeration that specifies how the columns are generated. The default value is None. |
AutoGenerateColumnsModeForCustomType
Gets or sets the AutoGenerateColumnsModeForCustomType that indicates whether to create the columns for custom parent type or child inner properties or custom type and its child properties.
Declaration
public AutoGenerateColumnsModeForCustomType AutoGenerateColumnsModeForCustomType { get; set; }
Property Value
Type | Description |
---|---|
AutoGenerateColumnsModeForCustomType | The default is Child. |
Remarks
By default, the columns are created for custom type child properties.
CellTemplateSelector
Gets or sets the
Declaration
public DataTemplateSelector CellTemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.DataTemplateSelector | A custom |
CurrentCellBorderBrush
Gets or sets a brush that is used to draw the border color of the current cell.
Declaration
public Brush CurrentCellBorderBrush { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The border color of the current cell.The default value is black. |
CurrentCellBorderThickness
Gets or sets the width for the boundaries of the current cell border.
Declaration
public Thickness CurrentCellBorderThickness { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Thickness | The width of the current cell border.The default value is 2. |
EditorSelectionBehavior
Gets or sets value that indicates the position of cursor and selection in edit element when entering edit mode.
Declaration
public EditorSelectionBehavior EditorSelectionBehavior { get; set; }
Property Value
Type | Description |
---|---|
EditorSelectionBehavior | One of the EditorSelectionBehavior enumeration that denotes the position of cursor and selection in edit mode. The default value is SelectAll. |
EditTrigger
Gets or sets a value that indicates the mouse action that triggers editing.
Declaration
public EditTrigger EditTrigger { get; set; }
Property Value
Type | Description |
---|---|
EditTrigger | One of the EditTrigger enumeration that specifies the mouse action that triggers the editing. The default value is OnDoubleTap. |
FooterColumnCount
Declaration
[Cloneable(false)]
public int FooterColumnCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
FrozenColumnCount
Gets or sets the number of non-scrolling columns at left of the grid.
Declaration
[Cloneable(false)]
public int FrozenColumnCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of non-scrolling columns at left. The default value is zero. |
Remarks
Frozen columns are always displayed and it can't be scrolled out of visibility.
GridCopyOption
Gets or sets a value that indicates how the content is copied from SfDataGrid and SfTreeGrid control to the clipboard.
Declaration
public GridCopyOption GridCopyOption { get; set; }
Property Value
Type | Description |
---|---|
GridCopyOption | One of the GridCopyOption enumeration that specifies how the content is copied from SfDataGrid control to the clipboard. The default value is CopyData. |
Remarks
You can cancel or customize the copy operation through GridCopyContent and CopyGridCellContent event handlers in SfDataGrid. You can cancel or customize the copy operation through CopyContent and CopyCellContent event handlers in SfTreeGrid.
GridPasteOption
Gets or sets a value that indicates how the clipboard value is pasted into SfDataGrid and SfTreeGrid.
Declaration
public GridPasteOption GridPasteOption { get; set; }
Property Value
Type | Description |
---|---|
GridPasteOption | One of the GridPasteOption enumeration that specifies how the clipboard value is pasted in to SfDataGrid. The default value is PasteData. |
Remarks
You can customize or cancel the paste operations through GridPasteContent and PasteGridCellContent event handlers in SfDataGrid. You can cancel or customize the paste operations through PasteContent and PasteCellContent event handlers in SfTreeGrid.
GridValidationMode
Gets or sets a value to enable the built-in validation (IDataErrorInfo/DataAnnonations) to validate the user input and displays the error.
Declaration
public GridValidationMode GridValidationMode { get; set; }
Property Value
Type | Description |
---|---|
GridValidationMode | One of the GridValidationMode enumeration that specifies how the row or cell is validated. The default mode is None. |
Remarks
The GridValidationMode process the built-in validations when data object implements System.ComponentModel.IDataErrorInfo,System.ComponentModel.INotifyDataErrorInfo and System.ComponentModel.DataAnnotations. The validation can also be done using CurrentCellValidating and RowValidating events in SfDataGrid and SfTreeGrid.
HeaderContextMenu
Declaration
public MenuFlyout HeaderContextMenu { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.MenuFlyout |
Remarks
Command bound with MenuItem receives GridColumnContextMenuInfo for SfDataGrid and MenuFlyoutItem receives TreeGridColumnContextMenuInfo for SfTreeGrid as command parameter which contains the corresponding record.
HeaderRowHeight
Gets or sets the height of header row.
Declaration
public double HeaderRowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the header row. |
Remarks
Header row can be hide by setting HeaderRowHeight as zero.
IsReadOnly
Gets or sets the value that determines if the user can change the text in the GridCell.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | trueif the GridCell is in read-only state; otherwise, false. The default value is false. |
Remarks
If the GridCell is read-only state, no user input or edits are allowed, but programmatic changes can be made. The user can still select text, and the key events events are marked as handled. The difference between the AllowEditing and IsReadOnly behavior is user input. AllowEditing allows the user inputs but IsReadOnly won't allow.
NavigationMode
Gets or sets the NavigationMode that indicates whether the navigation can be accomplished based on either cell or row in SfDataGrid.
Declaration
public NavigationMode NavigationMode { get; set; }
Property Value
Type | Description |
---|---|
NavigationMode | One of the NavigationMode enumeration that specifies the navigation based on either row or cell in SfDataGrid . The default registered mode is Cell. |
RecordContextMenu
Gets or sets the shortcut menu that appears on each record cells.
Declaration
public MenuFlyout RecordContextMenu { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.MenuFlyout | The shortcut menu for each record. The default value is null. |
Remarks
Command bound with MenuItem receives GridRecordContextMenuInfo for SfDataGrid and MenuFlyoutItem receives TreeGridNodeContextMenuInfo for SfTreeGrid as command parameter which contains the corresponding record.
RowHeaderWidth
Gets or sets the width of the RowHeader.
Declaration
public double RowHeaderWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the RowHeader. |
Remarks
RowHeader can be enabled by setting
RowHeight
Gets or sets the height for record rows in SfDataGrid and SfTreeGrid.
Declaration
public double RowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of record row in SfDataGrid and SfTreeGrid. |
Remarks
Particular record row height can be changed by specifying row index in VisualContainer.RowHeights
for SfDataGrid and TreeGridPanel.RowHeights
for SfTreeGrid.
Once row heights are changed, need to call the InvalidateMeasureInfo method of VisualContainer for SfDataGrid and TreeGridPanel for SfTreeGrid to refresh the view.
Examples
using Syncfusion.UI.Xaml.Grid.Helpers;
var visualContainer = this.dataGrid.GetVisualContainer();
//Set RowHeight to 2'nd row
visualContainer.RowHeights[2] = 50;
visualContainer.InvalidateMeasure();
using Syncfusion.UI.Xaml.TreeGrid.Helpers;
var treeGridPanel = this.treeGrid.GetTreePanel();
//Set RowHeight to 2'nd row
treeGridPanel.RowHeights[2] = 50;
treeGridPanel.InvalidateMeasure();
SelectedIndex
Gets or sets the index of corresponding selected cell or row.
Declaration
[Cloneable(false)]
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected item.The default value is -1. |
SelectedItem
Gets or sets the data item bound to the row or cell that contains the current cell.
Declaration
[Cloneable(false)]
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The object that is the currently selected item or null if there is no currently selected item. |
SelectedItems
Declaration
[Cloneable(false)]
public ObservableCollection<object> SelectedItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<System.Object> |
SelectionMode
Gets or sets the value that indicates how the rows or cells are selected in SfDataGrid.
Declaration
public GridSelectionMode SelectionMode { get; set; }
Property Value
Type | Description |
---|---|
GridSelectionMode | One of the GridSelectionMode enumeration that specifies the selection behavior in SfDataGrid . The default value is Single . |
ShowRowHeader
Gets or sets a value that indicates the visibility of RowHeader column which is used to denote the status of row.
Declaration
public bool ShowRowHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the RowHeader is visible; otherwise, false.The default value is false. |
Remarks
RowHeader is a special column used to indicate the status of row (current row, editing status, errors in row, etc.) which is placed as first cell of each row.
ShowSortNumbers
Gets or sets a value that indicates whether the sequence number should be displayed on the header cell of sorted column during multi-column sorting.
Declaration
public bool ShowSortNumbers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the sequence number is displayed on the header cell of sorted column ; otherwise,false.The default value is false . |
Remarks
The multi-column sorting can be applied by pressing CTRL key and the corresponding sequence number is displayed on its header cell of the column simultaneously.
ShowToolTip
Gets or sets value that indicates whether the tooltip should be displayed when mouse hovered on the cells in the control.
Declaration
public bool ShowToolTip { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the tool tip is enabled in the column; otherwise, false. The default value is false. |
SortClickAction
Gets or sets a value that indicates whether the user can sort the data either at single or double click.
Declaration
public SortClickAction SortClickAction { get; set; }
Property Value
Type | Description |
---|---|
SortClickAction | One of the SortClickAction enumeration that specifies the sort click action. The default value is SingleClick. |
SortColumnDescriptions
Declaration
[Cloneable(false)]
public SortColumnDescriptions SortColumnDescriptions { get; set; }
Property Value
Type | Description |
---|---|
SortColumnDescriptions |
StackedHeaderRows
Declaration
[Cloneable(false)]
public StackedHeaderRows StackedHeaderRows { get; set; }
Property Value
Type | Description |
---|---|
StackedHeaderRows |
Methods
CreateColumn(PropertyInfo, DisplayAttribute, out Boolean)
Declaration
protected GridColumnBase CreateColumn(PropertyInfo propertyinfo, DisplayAttribute displayAttribute, out bool cancelArgs)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.PropertyInfo | propertyinfo | |
System.ComponentModel.DataAnnotations.DisplayAttribute | displayAttribute | |
System.Boolean | cancelArgs |
Returns
Type | Description |
---|---|
GridColumnBase |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |