Class SfDataGrid
Inherited Members
Namespace: Syncfusion.UI.Xaml.DataGrid
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class SfDataGrid : SfGridBase, IDisposable, INotifyDependencyPropertyChanged, IDetailsViewNotifier
Constructors
SfDataGrid()
Initialize a new instance of the SfDataGrid class.
Declaration
public SfDataGrid()
Fields
AddNewRowPositionProperty
Identifies the AddNewRowPosition dependency property.
Declaration
public static readonly DependencyProperty AddNewRowPositionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AddNewRowPosition dependency property.
AddNewRowTextProperty
Identifies the AddNewRowText dependency property.
Declaration
public static readonly DependencyProperty AddNewRowTextProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AddNewRowText dependency property.
AllowDeletingProperty
Identifies the AllowDeleting dependency property.
Declaration
public static readonly DependencyProperty AllowDeletingProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowDeleting dependency property.
AllowFilteringProperty
Identifies the AllowFiltering dependency property.
Declaration
public static readonly DependencyProperty AllowFilteringProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowFiltering dependency property.
AllowFrozenGroupHeadersProperty
Identifies the AllowFrozenGroupHeaders dependency property.
Declaration
public static readonly DependencyProperty AllowFrozenGroupHeadersProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowFrozenGroupHeaders dependency property.
AllowGroupingProperty
Identifies the AllowGrouping dependency property.
Declaration
public static readonly DependencyProperty AllowGroupingProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowGrouping dependency property.
AllowRowHoverHighlightingProperty
Identifies the AllowRowHoverHighlighting dependency property.
Declaration
public static readonly DependencyProperty AllowRowHoverHighlightingProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AllowRowHoverHighlighting dependency property.
AlternatingRowStyleProperty
Identifies the AlternatingRowStyle dependency property.
Declaration
public static readonly DependencyProperty AlternatingRowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AlternatingRowStyle dependency property.
Examples
<Application.Resources>
<ResourceDictionary>
<local:CustomRowStyleSelector x:Key="alternatingRowStyleSelector" />
<Style x:Key="rowStyle1" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Bisque" />
</Style>
<Style x:Key="rowStyle2" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Aqua" />
</Style>
</ResourceDictionary>
</Application.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
ItemsSource="{Binding Orders}"
AlternatingRowStyleSelector="{StaticResource alternatingRowStyleSelector}"/>
AlternatingRowStyleSelectorProperty
Identifies the AlternatingRowStyleSelector dependency property.
Declaration
public static readonly DependencyProperty AlternatingRowStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AlternatingRowStyleSelector dependency property.
AlternationCountProperty
Identifies the AlternationCount dependency property.
Declaration
public static readonly DependencyProperty AlternationCountProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AlternationCount dependency property.
AutoExpandGroupsProperty
Identifies the AutoExpandGroups dependency property.
Declaration
public static readonly DependencyProperty AutoExpandGroupsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AutoExpandGroups dependency property.
AutoGenerateRelationsProperty
Identifies the AutoGenerateRelations dependency property.
Declaration
public static readonly DependencyProperty AutoGenerateRelationsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the AutoGenerateRelations dependency property.
BindableViewProperty
Identifies the BindableView dependency property.
Declaration
public static readonly DependencyProperty BindableViewProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the BindableView dependency property.
CanMaintainScrollPositionProperty
Identifies the CanMaintainScrollPosition dependency property.
Declaration
public static readonly DependencyProperty CanMaintainScrollPositionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CanMaintainScrollPosition dependency property.
CanUseViewFilterProperty
Identifies the CanUseViewFilter dependency property.
Declaration
public static readonly DependencyProperty CanUseViewFilterProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CanUseViewFilter dependency property.
CaptionSummaryCellStyleProperty
Identifies the CaptionSummaryCellStyle dependency property.
Declaration
public static readonly DependencyProperty CaptionSummaryCellStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CaptionSummaryCellStyle dependency property.
CaptionSummaryCellStyleSelectorProperty
Identifies the CaptionSummaryCellStyleSelector dependency property.
Declaration
public static readonly DependencyProperty CaptionSummaryCellStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CaptionSummaryCellStyleSelector dependency property.
CaptionSummaryRowProperty
Identifies the CaptionSummaryRow dependency property.
Declaration
public static readonly DependencyProperty CaptionSummaryRowProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CaptionSummaryRow dependency property.
CaptionSummaryRowStyleProperty
Identifies the CaptionSummaryRowStyle dependency property.
Declaration
public static readonly DependencyProperty CaptionSummaryRowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CaptionSummaryRowStyle dependency property.
CaptionSummaryRowStyleSelectorProperty
Identifies the CaptionSummaryRowStyleSelector dependency property.
Declaration
public static readonly DependencyProperty CaptionSummaryRowStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CaptionSummaryRowStyleSelector dependency property.
CellStyleProperty
Identifies the CellStyle dependency property.
Declaration
public static readonly DependencyProperty CellStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CellStyle dependency property.
CellStyleSelectorProperty
Identifies the CellStyleSelector dependency property.
Declaration
public static readonly DependencyProperty CellStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CellStyleSelector dependency property.
ClipboardControllerProperty
Identifies the ClipboardController dependency property.
Declaration
public static readonly DependencyProperty ClipboardControllerProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ClipboardController dependency property.
ColumnsProperty
Identifies the Columns dependency property.
Declaration
public static readonly DependencyProperty ColumnsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the Columns dependency property.
ColumnWidthModeProperty
Identifies the ColumnWidthMode dependency property.
Declaration
public static readonly DependencyProperty ColumnWidthModeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ColumnWidthMode dependency property.
CurrentCellInfoProperty
Identifies the CurrentCellInfo dependency property.
Declaration
public static readonly DependencyProperty CurrentCellInfoProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CurrentCellInfo dependency property.
CurrentColumnProperty
Identifies the CurrentColumn dependency property.
Declaration
public static readonly DependencyProperty CurrentColumnProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CurrentColumn dependency property.
CurrentItemProperty
Identifies the CurrentItem dependency property.
Declaration
public static readonly DependencyProperty CurrentItemProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the CurrentItem dependency property.
DataFetchSizeProperty
Identifies the DataFetchSize dependency property.
Declaration
public static readonly DependencyProperty DataFetchSizeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the DataFetchSize dependency property.
DetailsViewDataGridStyleProperty
Identifies the DetailsViewDataGridStyle dependency property.
Declaration
public static readonly DependencyProperty DetailsViewDataGridStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the DetailsViewDataGridStyle dependency property.
DetailsViewDefinitionProperty
Identifies the DetailsViewDefinition dependency property.
Declaration
public static readonly DependencyProperty DetailsViewDefinitionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the DetailsViewDefinition dependency property.
DetailsViewPaddingProperty
Identifies the DetailsViewPadding dependency property.
Declaration
public static readonly DependencyProperty DetailsViewPaddingProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the DetailsViewPadding dependency property.
EnableDataVirtualizationProperty
Identifies the EnableDataVirtualization dependency property.
Declaration
public static readonly DependencyProperty EnableDataVirtualizationProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the EnableDataVirtualization dependency property.
ExpanderColumnWidthProperty
Identifies the ExpanderColumnWidth dependency property.
Declaration
public static readonly DependencyProperty ExpanderColumnWidthProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ExpanderColumnWidth dependency property.
FilterPopupStyleProperty
Identifies the FilterPopupStyle dependency property.
Declaration
public static readonly DependencyProperty FilterPopupStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterPopupStyle dependency property.
FilterPopupTemplateProperty
Identifies the FilterPopupTemplate dependency property.
Declaration
public static readonly DependencyProperty FilterPopupTemplateProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterPopupTemplate dependency property.
FilterRowPositionProperty
Identifies the FilterRowPosition dependency property.
Declaration
public static readonly DependencyProperty FilterRowPositionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FilterRowPosition dependency property.
FrozenFooterRowsCountProperty
Identifies the FrozenFooterRowsCount dependency property.
Declaration
public static readonly DependencyProperty FrozenFooterRowsCountProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FrozenFooterRowsCount dependency property.
FrozenRowsCountProperty
Identifies the FrozenRowsCount dependency property.
Declaration
public static readonly DependencyProperty FrozenRowsCountProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the FrozenRowsCount dependency property.
GroupCaptionContextFlyoutProperty
Identifies the GroupCaptionContextFlyout dependency property.
Declaration
public static readonly DependencyProperty GroupCaptionContextFlyoutProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupCaptionContextFlyout dependency property.
GroupCaptionTextFormatProperty
Identifies the GroupCaptionTextFormat dependency property.
Declaration
public static readonly DependencyProperty GroupCaptionTextFormatProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupCaptionTextFormat dependency property.
GroupColumnDescriptionsProperty
Identifies the GroupColumnDescriptions dependency property.
Declaration
public static readonly DependencyProperty GroupColumnDescriptionsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupColumnDescriptions dependency property.
GroupDropAreaContextFlyoutProperty
Identifies the GroupDropAreaContextFlyout dependency property.
Declaration
public static readonly DependencyProperty GroupDropAreaContextFlyoutProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupDropAreaContextFlyout dependency property.
GroupDropAreaStyleProperty
Identifies the GroupDropAreaStyle dependency property.
Declaration
public static readonly DependencyProperty GroupDropAreaStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupDropAreaStyle dependency property.
GroupDropAreaTextProperty
Identifies the GroupDropAreaText dependency property.
Declaration
public static readonly DependencyProperty GroupDropAreaTextProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupDropAreaText dependency property.
GroupDropItemContextFlyoutProperty
Identifies the GroupDropItemContextFlyout dependency property.
Declaration
public static readonly DependencyProperty GroupDropItemContextFlyoutProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupDropItemContextFlyout dependency property.
GroupSummaryCellStyleProperty
Identifies the GroupSummaryCellStyle dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryCellStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryCellStyle dependency property.
GroupSummaryCellStyleSelectorProperty
Identifies the GroupSummaryCellStyleSelector dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryCellStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryCellStyleSelector dependency property.
GroupSummaryContextFlyoutProperty
Identifies the GroupSummaryContextFlyout dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryContextFlyoutProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryContextFlyout dependency property.
GroupSummaryRowsProperty
Identifies the GroupSummaryRows dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryRowsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryRows dependency property.
GroupSummaryRowStyleProperty
Identifies the GroupSummaryRowStyle dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryRowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryRowStyle dependency property.
GroupSummaryRowStyleSelectorProperty
Identifies the GroupSummaryRowStyleSelector dependency property.
Declaration
public static readonly DependencyProperty GroupSummaryRowStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the GroupSummaryRowStyleSelector dependency property.
HeaderStyleProperty
Identifies the HeaderStyle dependency property.
Declaration
public static readonly DependencyProperty HeaderStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the HeaderStyle dependency property.
Examples
<Page.Resources>
<Style TargetType="dataGrid:GridHeaderCellControl" x:Key="headerStyle">
<Setter Property="Foreground" Value="DarkBlue"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
</Page.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
HeaderStyle="{StaticResource headerStyle}"
ItemsSource="{Binding Orders}"
AutoGenerateColumns="True">
</dataGrid:SfDataGrid>
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the HeaderTemplate dependency property.
HideEmptyGridViewDefinitionProperty
Identifies the HideEmptyGridViewDefinition dependency property.
Declaration
public static readonly DependencyProperty HideEmptyGridViewDefinitionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the HideEmptyGridViewDefinition dependency property.
IndentColumnWidthProperty
Identifies the IndentColumnWidth dependency property.
Declaration
public static readonly DependencyProperty IndentColumnWidthProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the IndentColumnWidth dependency property.
IsDynamicItemsSourceProperty
Identifies the IsDynamicItemsSource dependency property.
Declaration
public static readonly DependencyProperty IsDynamicItemsSourceProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the IsDynamicItemsSource dependency property.
IsGroupDropAreaExpandedProperty
Identifies the IsGroupDropAreaExpanded dependency property.
Declaration
public static readonly DependencyProperty IsGroupDropAreaExpandedProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the IsGroupDropAreaExpanded dependency property.
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ItemsSource dependency property.
LiveDataUpdateModeProperty
Identifies the LiveDataUpdateMode dependency property.
Declaration
public static readonly DependencyProperty LiveDataUpdateModeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the LiveDataUpdateMode dependency property.
NewItemPlaceholderPositionProperty
Identifies the NewItemPlaceholderPosition dependency property.
Declaration
public static readonly DependencyProperty NewItemPlaceholderPositionProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the NewItemPlaceholderPosition dependency property.
NotificationSubscriptionModeProperty
Identifies the NotificationSubscriptionMode dependency property.
Declaration
public static readonly DependencyProperty NotificationSubscriptionModeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the NotificationSubscriptionMode dependency property.
NotifyEventsToParentDataGridProperty
Identifies the NotifyEventsToParentDataGrid dependency property.
Declaration
public static readonly DependencyProperty NotifyEventsToParentDataGridProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the NotifyEventsToParentDataGrid dependency property.
PrintSettingsProperty
Identifies the PrintSettings dependency property.
Declaration
public static readonly DependencyProperty PrintSettingsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the PrintSettings dependency property.
ReuseRowsOnItemsSourceChangeProperty
Identifies the ReuseRowsOnItemsSourceChange dependency property.
Declaration
public static readonly DependencyProperty ReuseRowsOnItemsSourceChangeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ReuseRowsOnItemsSourceChange dependency property.
RowStyleProperty
Identifies the RowStyle dependency property.
Declaration
public static readonly DependencyProperty RowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the RowStyle dependency property.
RowStyleSelectorProperty
Identifies the RowStyleSelector dependency property.
Declaration
public static readonly DependencyProperty RowStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the RowStyleSelector dependency property.
SelectedDetailsViewGridProperty
Identifies the SelectedDetailsViewGrid dependency property.
Declaration
public static readonly DependencyProperty SelectedDetailsViewGridProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SelectedDetailsViewGrid dependency property.
SelectionBackgroundProperty
Identifies the SelectionBackground dependency property.
Declaration
public static readonly DependencyProperty SelectionBackgroundProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SelectionBackground dependency property.
SelectionForegroundProperty
Identifies the SelectionForeground dependency property.
Declaration
public static readonly DependencyProperty SelectionForegroundProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SelectionForeground dependency property.
SelectionUnitProperty
Identifies the SelectionUnit dependency property.
Declaration
public static readonly DependencyProperty SelectionUnitProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SelectionUnit dependency property.
ShowColumnWhenGroupedProperty
Identifies the ShowColumnWhenGrouped dependency property.
Declaration
public static readonly DependencyProperty ShowColumnWhenGroupedProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ShowColumnWhenGrouped dependency property.
ShowDetailsViewIndentCellProperty
Identifies the ShowDetailsViewIndentCell dependency property.
Declaration
public static readonly DependencyProperty ShowDetailsViewIndentCellProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ShowDetailsViewIndentCell dependency property.
ShowGroupDropAreaProperty
Identifies the ShowGroupDropArea dependency property.
Declaration
public static readonly DependencyProperty ShowGroupDropAreaProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the ShowGroupDropArea dependency property.
SortComparersProperty
Identifies the SortComparers dependency property.
Declaration
public static readonly DependencyProperty SortComparersProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SortComparers dependency property.
Examples
this.dataGrid.SortComparers.Add(new SortComparer() { Comparer = new CustomComparer(), PropertyName = "CustomerName" });
SourceTypeProperty
Identifies the SourceType dependency property.
Declaration
public static readonly DependencyProperty SourceTypeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SourceType dependency property.
SummaryCalculationModeProperty
Identifies the SummaryCalculationModes dependency property.
Declaration
public static readonly DependencyProperty SummaryCalculationModeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SummaryCalculationModes dependency property.
SummaryCalculationUnitProperty
Identifies the SummaryCalculationUnit dependency property.
Declaration
public static readonly DependencyProperty SummaryCalculationUnitProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the SummaryCalculationUnit dependency property.
TableSummaryCellStyleProperty
Identifies the TableSummaryCellStyle dependency property.
Declaration
public static readonly DependencyProperty TableSummaryCellStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryCellStyle dependency property.
TableSummaryCellStyleSelectorProperty
Identifies the TableSummaryCellStyleSelector dependency property.
Declaration
public static readonly DependencyProperty TableSummaryCellStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryCellStyleSelector dependency property.
TableSummaryContextFlyoutProperty
Identifies the TableSummaryContextFlyout dependency property.
Declaration
public static readonly DependencyProperty TableSummaryContextFlyoutProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryContextFlyout dependency property.
TableSummaryRowsProperty
Identifies the TableSummaryRows dependency property.
Declaration
public static readonly DependencyProperty TableSummaryRowsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryRows dependency property.
TableSummaryRowStyleProperty
Identifies the TableSummaryRowStyle dependency property.
Declaration
public static readonly DependencyProperty TableSummaryRowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryRowStyle dependency property.
TableSummaryRowStyleSelectorProperty
Identifies the TableSummaryRowStyleSelector dependency property.
Declaration
public static readonly DependencyProperty TableSummaryRowStyleSelectorProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the TableSummaryRowStyleSelector dependency property.
UnboundRowCellStyleProperty
Identifies the UnboundRowCellStyle dependency property.
Declaration
public static readonly DependencyProperty UnboundRowCellStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the UnboundRowCellStyle dependency property.
UnboundRowsProperty
Identifies the UnboundRows dependency property.
Declaration
public static readonly DependencyProperty UnboundRowsProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the UnboundRows dependency property.
UnboundRowStyleProperty
Identifies the UnboundRowStyle dependency property.
Declaration
public static readonly DependencyProperty UnboundRowStyleProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the UnboundRowStyle dependency property.
UsePLINQProperty
Identifies the UsePLINQ dependency property.
Declaration
public static readonly DependencyProperty UsePLINQProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the UsePLINQ dependency property.
Properties
AddNewRowPosition
Gets or sets a value that indicates the visibility and position of AddNewRow in SfDataGrid.
Declaration
public AddNewRowPosition AddNewRowPosition { get; set; }
Property Value
Type | Description |
---|---|
AddNewRowPosition | One of the AddNewRowPosition enumeration that specifies the visibility and position of AddNewRow. The default value is None. |
See Also
AddNewRowText
Gets or set the watermark text displayed in the new row. If this value is empty or null, then the text from the localization provider will be used.
Declaration
public string AddNewRowText { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the format of AddNewRowText. The default value is null. |
Remarks
You can use this property to define the different text for parent and detailsview datagrid’s new row.
AllowDeleting
Gets or sets a value that indicates whether the user can delete the rows using Delete Key.
Declaration
public bool AllowDeleting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the user can delete the rows; otherwise, false. The default value is false. |
Remarks
The deleting operations can be handled through RecordDeleting and RecordDeleted event handlers in SfDataGrid.
AllowFiltering
Gets or sets a value that indicates whether the filtering is enabled in SfDataGrid.
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the filtering is enabled in SfDataGrid; otherwise, false. The default value is false. |
Remarks
The filtering operation can be canceled or customized through FilterChanging and FilterChanged events in SfDataGrid.
See Also
AllowFrozenGroupHeaders
Gets or sets a value that indicates whether the group header remains fixed at the width of display area or scrolled(horizontal scrolling) out of its visibility.
Declaration
public bool AllowFrozenGroupHeaders { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true, if the group headers is fixed; otherwise, false. The default value is false. |
AllowGrouping
Gets or sets a value indicates whether the user can drag and drop the column to GroupDropArea.
Declaration
public bool AllowGrouping { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the user can drag and drop the column to GroupDropArea; otherwise, false. The default value is true. |
See Also
AllowRowHoverHighlighting
Gets or sets a value that indicates whether the user can highlight the row being hovered through mouse or touch.
Declaration
public bool AllowRowHoverHighlighting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the row is highlighted while mouse hovering on it; otherwise, false. The default value is true. |
Remarks
The highlighting color can be customized using
AlternatingRowStyle
Gets or sets the style applied to alternate data row in SfDataGrid.
Declaration
public Style AlternatingRowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to each alternate data row in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for alternate row, specify a TargetType of DataGridRowControl. AlternateRowStyle will be applied based on AlternationCount.
See Also
AlternatingRowStyleSelector
Gets or sets the style applied to alternate data row conditionally based on data in SfDataGrid.
Declaration
public StyleSelector AlternatingRowStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to alternate row based on data. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for alternate row, specify a TargetType of DataGridRowControl.
Examples
<Application.Resources>
<ResourceDictionary>
<local:CustomRowStyleSelector x:Key="alternatingRowStyleSelector" />
<Style x:Key="rowStyle1" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Bisque" />
</Style>
<Style x:Key="rowStyle2" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Aqua" />
</Style>
</ResourceDictionary>
</Application.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
ItemsSource="{Binding Orders}"
AlternatingRowStyleSelector="{StaticResource alternatingRowStyleSelector}"/>
See Also
AlternationCount
Gets or sets the number of alternate data rows to have a unique appearance.
Declaration
public int AlternationCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of alternate data rows in SfDataGrid. The default value is 2. |
See Also
AutoExpandGroups
Gets or sets a value that indicates whether the group is expanded automatically, when the column is grouped.
Declaration
public bool AutoExpandGroups { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the groups is expanded automatically; otherwise, false. The default value is false. |
AutoFitRange
Gets or sets a value that determines the range of rows considered for auto-sizing columns.
Declaration
public AutoFitRange AutoFitRange { get; set; }
Property Value
Type | Description |
---|---|
AutoFitRange | The default value is AllRows, which calculates based on the entire table. |
Remarks
The AutoFitRange property specifies whether auto-sizing columns should be based on visible rows or the entire table.
AutoGenerateRelations
Gets or sets a value that indicates whether the relations for Master-Details View is generated automatically.
Declaration
public bool AutoGenerateRelations { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if relations is auto-generated; otherwise, false. The default value is false. |
Remarks
You can cancel or customize the relation being created in theAutoGeneratingRelations event handler.
AutoScroller
Gets or sets an instance of the AutoScroller to perform horizontal or vertical scrolling automatically, when the selection is dragged outside of the visible boundaries in SfDataGrid.
Declaration
public AutoScroller AutoScroller { get; set; }
Property Value
Type | Description |
---|---|
AutoScroller | An instance of the AutoScroller. |
See Also
BindableView
Gets or sets an instance of the ICollectionViewAdv which manage the records, sorting, grouping, summaries and filtering for SfDataGrid.
Declaration
public ICollectionViewAdv BindableView { get; set; }
Property Value
Type | Description |
---|---|
ICollectionViewAdv | Return a collection if it have else throws an exception. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when you set value for BindableView property explicitly. |
CanMaintainScrollPosition
Gets or sets a value that indicates whether to maintain ScrollPosition when ItemsSource or SourceCollection for the SfDataGrid is changed.
Declaration
public bool CanMaintainScrollPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if need to maintain scroll position; otherwise, false. The default value is false. |
CanUseViewFilter
Gets or sets a value that indicates whether to create view by considering ICollectionView.Filter and DataView.RowFilter.
Declaration
public bool CanUseViewFilter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if View need to filter the rows in SfDataGrid, using DataView.RowFilter expression and ICollectionView.Filter method; otherwise, false. The default value is false. |
Remarks
The default filter which created in DataView or ICollectionView can be applied or canceled through CanUseViewFilter property.
CaptionSummaryCellStyle
Gets or sets the style applied to all the caption summary cells in SfDataGrid.
Declaration
public Style CaptionSummaryCellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the caption summary cells in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a caption summary cell, specify a TargetType of GridCaptionSummaryCell.
See Also
CaptionSummaryCellStyleSelector
Gets or sets the style applied to caption summary cell conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector CaptionSummaryCellStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to caption summary cell based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a caption summary cell, specify a TargetType of GridCaptionSummaryCell.
See Also
CaptionSummaryRow
Gets or sets the GridSummaryRow that displays the summary information at the header of each group.
Declaration
public GridSummaryRow CaptionSummaryRow { get; set; }
Property Value
Type | Description |
---|---|
GridSummaryRow | The GridSummaryRow to display the summary information at the header of each group. The default value is null. |
Remarks
Each group can have only one caption summary and the summary value is calculated over all the records with in the group.
Examples
this.sfDataGrid.CaptionSummaryRow = new GridSummaryRow()
{
ShowSummaryInRow = false,
SummaryColumns = new ObservableCollection<ISummaryColumn>()
{
new GridSummaryColumn()
{
Name = "PriceAmount",
MappingName = "UnitPrice",
SummaryType = SummaryType.DoubleAggregate,
Format = "{Sum:c}"
},
new GridSummaryColumn()
{
Name = "OrderCount",
MappingName = "OrderID",
SummaryType = SummaryType.CountAggregate,
Format = "{Count:d}"
},
}
};
See Also
CaptionSummaryRowStyle
Gets or sets the style applied to all the caption summary rows in SfDataGrid.
Declaration
public Style CaptionSummaryRowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the caption summary rows in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a CaptionSummaryRow, specify a TargetType of CaptionSummaryRowControl.
CaptionSummaryRowStyleSelector
Gets or sets the style applied to caption summary row conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector CaptionSummaryRowStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to caption summary row based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a CaptionSummaryRow, specify a TargetType of CaptionSummaryRowControl.
See Also
CellRenderers
Gets the reference to the GridCellRendererCollection instance which holds the collection of all predefined cell renderers GridVirtualizingCellRenderer<D, E>.
Declaration
public GridCellRendererCollection CellRenderers { get; }
Property Value
Type | Description |
---|---|
GridCellRendererCollection | instance which holds the collection of all predefined cell renderers GridVirtualizingCellRenderer<D, E>. |
Remarks
The cell renderers provides various properties and virtual methods to customize its operations. When any of the predefined renderer is customized, that should be replaced to the CellRenderers collection with its appropriate cell type. The below table shows the predefined renderers and its corresponding cell type associated with column.
Renderer Class | Cell TypeAssociated column |
---|---|
GridCellTextBlockRenderer | TextBlock- |
GridCellTextBoxRenderer | TextBoxGridTextColumn |
GridCellCheckBoxRenderer | CheckBoxGridCheckBoxColumn |
GridCellTemplateRenderer | TemplateGridTemplateColumn |
GridCellImageRenderer | ImageGridImageColumn |
GridUnboundCellTextBoxRenderer | UnBoundTextColumnGridUnboundColumn |
GridUnboundCellTemplateRenderer | UnBoundTemplateColumnGridUnboundColumn |
GridCellComboBoxRenderer | ComboBoxGridComboBoxColumn |
GridCellHyperlinkRenderer | HyperLinkGridHyperlinkColumn |
GridTableSummaryCellRenderer | TableSummaryGridTableSummaryCell |
GridCaptionSummaryCellRenderer | CaptionSummaryGridCaptionSummaryCell |
GridSummaryCellRenderer | GroupSummaryGridGroupSummaryCell |
GridDataHeaderCellRenderer | HeaderGridHeaderCellControl |
GridStackedHeaderCellRenderer | StackedHeaderGridStackedHeaderCellControl |
GridRowHeaderCellRenderer | RowHeaderGridRowHeaderCell |
GridDetailsViewExpanderCellRenderer | DetailsViewExpanderGridDetailsViewExpanderCell |
Examples
//The customized GridCellTextBoxRendererExt is replaced to CellRenderers collection after removed the default renderer of GridTextColumn.
this.dataGrid.CellRenderers.Remove("TextBox");
this.dataGrid.CellRenderers.Add("TextBox",new GridCellTextBoxRendererExt());
CellStyle
Gets or sets the style applied to all the record cells in SfDataGrid.
Declaration
public Style CellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the record cells in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a cell, specify a TargetType of GridCell.
Examples
<Page.Resources>
<Style TargetType="dataGrid:GridCell" x:Key="cellStyle">
<Setter Property="Foreground" Value="DarkBlue"/>
</Style>
</Page.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
CellStyle="{StaticResource cellStyle}"
ItemsSource="{Binding Orders}"
AutoGenerateColumns="True">
</dataGrid:SfDataGrid>
See Also
CellStyleSelector
Gets or sets the style applied to record cells conditionally based on data in SfDataGrid.
Declaration
public StyleSelector CellStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to cell based on data. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a cell, specify a TargetType of GridCell.
Examples
<Application.Resources>
<ResourceDictionary>
<local:SelectorClass x:Key="styleSelector"/>
<Style x:Key="redCellStyle" TargetType="dataGrid:GridCell">
<Setter Property="Foreground" Value="Red" />
</Style>
<Style x:Key="blueCellStyle" TargetType="dataGrid:GridCell">
<Setter Property="Foreground" Value="DarkBlue" />
</Style>
</ResourceDictionary>
</Application.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
ItemsSource="{Binding Orders}"
CellStyleSelector="{StaticResource styleSelector}"/>
See Also
ClipboardController
Gets or sets an instance of the IDataGridClipboardController interface which controls the copy and paste operations in SfDataGrid.
Declaration
public IDataGridClipboardController ClipboardController { get; set; }
Property Value
Type | Description |
---|---|
IDataGridClipboardController | An instance of class that derives from IDataGridClipboardController interface. The default value is null. |
Remarks
The DataGridClipboardController class provides various properties and virtual methods to customize its operations.
See Also
ColumnDragDropController
Gets or sets an instance of the DataGridColumnDragDropController which controls the column drag-and-drop operation in SfDataGrid.
Declaration
public DataGridColumnDragDropController ColumnDragDropController { get; set; }
Property Value
Type | Description |
---|---|
DataGridColumnDragDropController | An instance of the DataGridColumnDragDropController class. |
Remarks
DataGridColumnDragDropController class provides various properties and virtual methods to customize its operations.
ColumnResizingController
Gets or sets an instance of the GridColumnResizingController which controls the resizing operation in SfDataGrid.
Declaration
public GridColumnResizingController ColumnResizingController { get; set; }
Property Value
Type | Description |
---|---|
GridColumnResizingController | An instance of the GridColumnResizingController class. |
Remarks
GridColumnResizingController class provides various properties and virtual methods to customize its operations.
See Also
Columns
Gets or sets the collection that contains all the columns in SfDataGrid.
Declaration
public Columns Columns { get; set; }
Property Value
Type | Description |
---|---|
Columns | The collection that contains all the columns in SfDataGrid. This property has no default value. |
Remarks
Each column associated with its own renderer and it controls the corresponding column related operations.
Examples
<syncfusion:SfDataGrid x:Name="sfDataGrid"
AutoGenerateColumns="False"
ItemsSource="{Binding OrdersDetails}">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn HeaderText = "Order ID" MappingName="OrderID"/>
<syncfusion:GridTextColumn HeaderText = "Quantity" MappingName="Quantity" />
<syncfusion:GridTextColumn HeaderText = "Ship City" MappingName="ShipCity" />
<syncfusion:GridTextColumn HeaderText = "Ship Address" MappingName="ShipAddress" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
Exceptions
Type | Condition |
---|---|
System.NullReferenceException | Thrown when the Columns value is set as null. |
See Also
ColumnSizer
Gets or sets an instance of the DataGridColumnSizer which controls columns sizing, column width auto calculation and row height auto calculation.
Declaration
public DataGridColumnSizer ColumnSizer { get; set; }
Property Value
Type | Description |
---|---|
DataGridColumnSizer | An instance of the DataGridColumnSizer class. |
Remarks
DataGridColumnSizer class provides various properties and virtual methods to customize its operations.
See Also
ColumnWidthMode
Gets or sets a value that indicates how the column widths are determined.
Declaration
public ColumnWidthMode ColumnWidthMode { get; set; }
Property Value
Type | Description |
---|---|
ColumnWidthMode | One of the ColumnWidthMode enumeration that calculate the column width. The default value is None. |
Remarks
The default behavior of ColumnWidthMode can be customized through DataGridColumnSizer property.
CoveredCells
Gets the list of CoveredCellInfo collection which are queried using QueryCoveredRange event for the visible rows and columns.
Declaration
public CoveredCellInfoCollection CoveredCells { get; }
Property Value
Type | Description |
---|---|
CoveredCellInfoCollection | The list of CoveredCellInfo collection. |
CurrentCellInfo
Gets or sets the GridCellInfo which holds the current cell information such as corresponding record, index, column, and etc.
Declaration
public GridCellInfo CurrentCellInfo { get; set; }
Property Value
Type | Description |
---|---|
GridCellInfo | The GridCellInfo that holds the current cell information. The default value is null. |
Remarks
The current cell information is maintained for cell selection only.
CurrentColumn
Gets or sets the column that contains the current cell.
Declaration
public GridColumn CurrentColumn { get; set; }
Property Value
Type | Description |
---|---|
GridColumn | The column that contains the current cell. The default value is null. |
CurrentItem
Gets or sets the data item that corresponds to the focused row or cell.
Declaration
public object CurrentItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The corresponding focused data item. The default registered value is null. |
DataFetchSize
Gets or sets the amount of data to fetch for virtualizing operations. This property only using in Incremental Loading operations.
Declaration
public int DataFetchSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The amount of data fetched for virtualizing operations. The default value is 5. |
DetailsViewDataGridStyle
Gets or sets the style applied to all the DetailsViewDataGrid.
Declaration
public Style DetailsViewDataGridStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the DetailsViewDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a DetailsViewDataGrid, specify a TargetType of DetailsViewDataGrid.
DetailsViewDefinition
Gets or sets the collection of ViewDefinition that enables you to represent the data in to hierarchical format.
Declaration
public DetailsViewDefinition DetailsViewDefinition { get; set; }
Property Value
Type | Description |
---|---|
DetailsViewDefinition | The collection of ViewDefinition. The default value is null. |
Remarks
This property helps you to populate Master-Details View manually.
See Also
DetailsViewPadding
Gets or sets the padding of the DetailsViewDataGrid
Declaration
public Thickness DetailsViewPadding { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Thickness | The padding for the DetailsViewDataGrid. |
Remarks
The DetailsViewPadding needs to be defined to its parent DataGrid, when the child grid is required padding.
EnableDataVirtualization
Gets or sets a value that indicates whether to create RecordEntry for all the objects in SourceCollection.
Declaration
public bool EnableDataVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to create RecordEntry only when try to access this index. |
ExpanderColumnWidth
Gets or sets the Expander column width.
Declaration
public double ExpanderColumnWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of Expander column. |
Remarks
Details view can be enabled by setting DetailsViewDefinition of SfDataGrid.
FilterPopupStyle
Gets or sets the style applied to the filter pop-up in SfDataGrid.
Declaration
public Style FilterPopupStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to the filter pop-up in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a filter pop-up, specify a TargetType of GridFilterControl.
See Also
FilterPopupTemplate
Gets or sets Microsoft.UI.Xaml.DataTemplate that defines the visual representation of the filter pop-up in SfDataGrid.
Declaration
public DataTemplate FilterPopupTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate | The object that defines the visual representation of the filter pop-up. The default value is null. |
See Also
FilterRowCellRenderers
Gets the reference to the GridCellRendererCollection instance which holds the collection of all predefined cell renderers GridFilterRowCellRenderer<D, E>.
Declaration
public GridCellRendererCollection FilterRowCellRenderers { get; }
Property Value
Type | Description |
---|---|
GridCellRendererCollection | Instance which holds the collection of all Fitter row cell renderers GridFilterRowCellRenderer<D, E>. |
Remarks
The cell renderers provides various properties and virtual methods to customize its operations. When any of the predefined renderer is customized, that should be replaced to the FilterRowCellRenderers collection with its appropriate renderer name. The below table shows the predefined renderers and its corresponding name.
Renderer Class | Renderer Name |
---|---|
GridFilterRowTextBoxRenderer | TextBox |
GridFilterRowCheckBoxRenderer | CheckBox |
FilterRowPosition
Gets or sets a value that indicates the visibility and position of FilterRow in SfDataGrid.
Declaration
public FilterRowPosition FilterRowPosition { get; set; }
Property Value
Type | Description |
---|---|
FilterRowPosition | One of the FilterRowPosition enumeration that specifies the visibility and position of FilterRow. The default value is None. |
See Also
FrozenFooterRowsCount
Gets or sets the number of non-scrolling rows at bottom of the SfDataGrid.
Declaration
public int FrozenFooterRowsCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of non-scrolling rows at bottom. The default value is zero. |
Remarks
Footer rows are always displayed and it can’t be scrolled out of visibility.
See Also
FrozenRowsCount
Gets or sets the number of non-scrolling rows at top of the SfDataGrid.
Declaration
public int FrozenRowsCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of non-scrolling rows at top. The default value is zero. |
Remarks
Frozen rows are always displayed and it cannot be scrolled out of visibility.
See Also
GroupCaptionContextFlyout
Gets or sets the shortcut menu that appears on the group caption of SfDataGrid.
Declaration
public MenuFlyout GroupCaptionContextFlyout { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.MenuFlyout | The shortcut menu for the group caption in SfDataGrid. The default value is null. |
Remarks
Command bound with MenuItem receives GridRecordContextFlyoutInfo as command parameter which contains the corresponding group.
GroupCaptionTextFormat
Gets or sets the format of group caption text.
Declaration
public string GroupCaptionTextFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the format of group caption text. The default value is null. |
GroupColumnDescriptions
Gets or sets the collection of GroupColumnDescription object that describes how the column to be grouped in to view.
Declaration
public GroupColumnDescriptions GroupColumnDescriptions { get; set; }
Property Value
Type | Description |
---|---|
GroupColumnDescriptions | The collection of GroupColumnDescription object. The default value is null. |
Examples
this.dataGrid.View.BeginInit();
this.dataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "OrderID" });
this.dataGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "CustomerID" });
this.dataGrid.View.EndInit();
GroupDropAreaContextFlyout
Gets or sets the shortcut menu that appears on the GroupDropArea of SfDataGrid.
Declaration
public MenuFlyout GroupDropAreaContextFlyout { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.MenuFlyout | The shortcut menu for the GroupDropArea in SfDataGrid. The default value is null. |
Remarks
Command bound with MenuItem receives GridGroupDropAreaContextFlyoutInfo as command parameter which contains the SfDataGrid information.
GroupDropAreaStyle
Gets or sets the style applied to GroupDropArea in SfDataGrid.
Declaration
public Style GroupDropAreaStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to GroupDropArea in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for GroupDropArea, specify a TargetType of GroupDropArea.
GroupDropAreaText
Gets or sets the string that is used to displayed on the GroupDropArea in SfDataGrid.
Declaration
public string GroupDropAreaText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string that is used to displayed on the GroupDropArea. |
GroupDropItemContextFlyout
Gets or sets the shortcut menu that appears on the group drop item of GroupDropArea.
Declaration
public MenuFlyout GroupDropItemContextFlyout { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.MenuFlyout | The shortcut menu for the group drop item in SfDataGrid. The default value is null. |
Remarks
Command bound with MenuItem receives GridColumnContextFlyoutInfo as command parameter which provides GridColumn information.
GroupSummaryCellStyle
Gets or sets the style applied all the group summary cells in SfDataGrid.
Declaration
public Style GroupSummaryCellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the group summary cells in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a group summary cell, specify a TargetType of GridGroupSummaryCell.
See Also
GroupSummaryCellStyleSelector
Gets or sets the style applied to group summary cell conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector GroupSummaryCellStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to group summary cell based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a group summary cell, specify a TargetType of GridGroupSummaryCell.
See Also
GroupSummaryContextFlyout
Gets or sets the shortcut menu that appears on the group summary of SfDataGrid.
Declaration
public MenuFlyout GroupSummaryContextFlyout { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.MenuFlyout | The shortcut menu for the group summary in SfDataGrid. The default value is null. |
Remarks
Command bound with MenuItem receives GridRecordContextFlyoutInfo as command parameter which contains the corresponding summary record.
GroupSummaryRows
Gets or sets the collection of GridSummaryRow that displays summary information at the footer of each group.
Declaration
public ObservableCollection<GridSummaryRow> GroupSummaryRows { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<GridSummaryRow> | The collection of GridSummaryRow to display the summary information at footer of each group. The default value is null. |
Remarks
Each group can have more than one group summary row and the summary values is calculated over all the records with in the group.
Examples
this.sfDataGrid.GroupSummaryRows.Add(new GridSummaryRow()
{
ShowSummaryInRow = false,
SummaryColumns = new ObservableCollection<ISummaryColumn>()
{
new GridSummaryColumn()
{
Name = "PriceAmount",
MappingName = "UnitPrice",
SummaryType = SummaryType.DoubleAggregate,
Format = "Amount - {Sum:c}"
},
new GridSummaryColumn()
{
Name = "OrderCount",
MappingName = "OrderID",
SummaryType = SummaryType.CountAggregate,
Format = "Count - {Count:d}"
},
}
});
See Also
GroupSummaryRowStyle
Gets or sets the style applied to all the group summary rows in SfDataGrid.
Declaration
public Style GroupSummaryRowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the group summary rows in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a GroupSummaryRow, specify a TargetType of GroupSummaryRowControl.
GroupSummaryRowStyleSelector
Gets or sets the style applied to group summary row conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector GroupSummaryRowStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to group summary row based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a GroupSummaryRow, specify a TargetType of GroupSummaryRowControl.
See Also
HeaderStyle
Gets or sets the style applied to all the header cells in SfDataGrid.
Declaration
public Style HeaderStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the header cells in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for header cell, specify a TargetType of GridHeaderCellControl.
Examples
<Page.Resources>
<Style TargetType="dataGrid:GridHeaderCellControl" x:Key="headerStyle">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Foreground" Value="DarkBlue"/>
</Style>
</Page.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
HeaderStyle="{StaticResource headerStyle}"
ItemsSource="{Binding Orders}"/>
See Also
HeaderTemplate
Gets or sets Microsoft.UI.Xaml.DataTemplate that defines the visual representation of the header cell in SfDataGrid.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DataTemplate | The object that defines the visual representation of the header cell in SfDataGrid. The default value is null. |
Examples
<Page.Resources>
<DataTemplate x:Key="headerTemplate">
<Grid>
<TextBlock VerticalAlignment="Center"
Foreground="DarkBlue" Text="{Binding}" />
</Grid>
</DataTemplate>
</Page.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
HeaderTemplate="{StaticResource headerTemplate}"
ItemsSource="{Binding Orders}"
AutoGenerateColumns="True">
</dataGrid:SfDataGrid>
See Also
HideEmptyGridViewDefinition
Gets or sets a value that indicates whether the expander should be hidden when relational column property has an empty collection or null.
Declaration
public bool HideEmptyGridViewDefinition { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the expander is hidden from the view; otherwise, false. The default value is false. |
IndentColumnWidth
Gets or sets the indent column width.
Declaration
public double IndentColumnWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of indent column. |
Remarks
Grouping can be enabled by setting GroupColumnDescriptions of SfDataGrid.
IsDynamicItemsSource
Gets or sets a value that denotes whether the underlying data object type is dynamic.
Declaration
public bool IsDynamicItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the underlying data object type is dynamic; otherwise, false. The default value is false. |
IsGroupDropAreaExpanded
Gets or sets a value that indicates whether the GroupDropArea can be expanded by default.
Declaration
public bool IsGroupDropAreaExpanded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the GroupDropArea is expanded; otherwise, false. The default value is false. |
IsListenerSuspended
Gets the value that indicates whether the listener notifications are suspended or not.
Declaration
public bool IsListenerSuspended { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the listener notification are suspended; otherwise, false. The default value is false. |
ItemsSource
Gets or sets the collection that is used to generate the content of the SfDataGrid.
Declaration
public object ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The collection that is used to generate the content of the SfDataGrid. The default value is null. |
Remarks
ItemsSourceChanged event will be raised when the ItemsSource property gets changed.
See Also
LiveDataUpdateMode
Gets or sets a value to control data manipulation operations during data updates.
Declaration
public LiveDataUpdateMode LiveDataUpdateMode { get; set; }
Property Value
Type | Description |
---|---|
LiveDataUpdateMode | One of the LiveDataUpdateMode that indicates how data manipulation operations are handled during data updates. The default value is Default. |
LostFocusBehavior
Gets or sets a value that specifies the behavior of the DataGrid when it loses focus.
Declaration
public LostFocusBehavior LostFocusBehavior { get; set; }
Property Value
Type | Description |
---|---|
LostFocusBehavior | Represents one of the LostFocusBehavior enumerations that specifies the behavior of the DataGrid when it loses focus. The default value is EndEditCurrentCell. |
Remarks
Defines the behavior of the DataGrid when the focus moves to another control from DataGrid.
NewItemPlaceholderPosition
Gets or sets a value that indicates the position of new record which is added using AddNewRow.
Declaration
public NewItemPlaceholderPosition NewItemPlaceholderPosition { get; set; }
Property Value
Type | Description |
---|---|
NewItemPlaceholderPosition | One of the NewItemPlaceholderPosition enumeration that specifies position of new record in collection. The default value is None. |
Remarks
This NewItemPlaceholderPosition property won't work for grouping case.
NotificationSubscriptionMode
Gets or sets a value that indicates whether to listen System.ComponentModel.INotifyPropertyChanging.PropertyChanging and System.ComponentModel.INotifyPropertyChanged.PropertyChanged events of data object and System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged event of SourceCollection.
Declaration
public NotificationSubscriptionMode NotificationSubscriptionMode { get; set; }
Property Value
Type | Description |
---|---|
NotificationSubscriptionMode | listen System.ComponentModel.INotifyPropertyChanging.PropertyChanging and System.ComponentModel.INotifyPropertyChanged.PropertyChanged events of data object and System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged event of SourceCollection. |
Remarks
By default, view listens to System.ComponentModel.INotifyPropertyChanging.PropertyChanging and System.ComponentModel.INotifyPropertyChanged.PropertyChanged events of data object and System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged event of SourceCollection.
NotifyEventsToParentDataGrid
Gets or sets a value indicates whether to notify details view DataGrid or child data DataGrid events to parent DataGrid. So, it is not needed to handle events for each level. Events of all DataGrid’s can be listened from parent DataGrid.
Declaration
public bool NotifyEventsToParentDataGrid { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the child DataGrid notifies the events to parent DataGrid; otherwise, false. The default value is false. |
Remarks
We can get the level of the DataGrid that firing an event from args.OriginalSender
private void DataGrid_RecordDeleting(object sender, RecordDeletingEventArgs args)
{
if(args.OriginalSender is DetailsViewDataGrid)
{
//Event is fired for DetailsView DataGrid.
}
else
{
//Event is fired for main DataGrid.
}
}
NotifyListener
Gets the listener that notifies the changes in DetailsView.
Declaration
public IDetailsViewNotifyListener NotifyListener { get; }
Property Value
Type | Description |
---|---|
IDetailsViewNotifyListener | The default value is true. |
PrintSettings
Gets or sets the configuration settings to print the SfDataGrid.
Declaration
public DataGridPrintSettings PrintSettings { get; set; }
Property Value
Type | Description |
---|---|
DataGridPrintSettings | The settings for print operations. |
Remarks
PrintSettings class that provides various properties for print settings.
ReuseRowsOnItemsSourceChange
Gets or sets a value that indicates whether to re-use rows and cells when ItemsSource gets changed at runtime.
Declaration
public bool ReuseRowsOnItemsSourceChange { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if rows can be reused and children will not be removed from VisualContainer; otherwise, false. The default value is true. |
RowGenerator
Gets or sets the RowGenerator of SfDataGrid.
Declaration
public RowGenerator RowGenerator { get; set; }
Property Value
Type | Description |
---|---|
RowGenerator | Processes the creation and re-using of containers for SfDataGrid. |
Remarks
The SfDataGrid will generate the DataRows which need to be display in UI and the rows will be maintained in Items.
RowStyle
Gets or sets the style applied to all the data rows in SfDataGrid.
Declaration
public Style RowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all data rows in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a row, specify a TargetType of DataGridRowControl.
Examples
<Page.Resources>
<Style TargetType="dataGrid:DataGridRowControl" x:Key="customRowStyle">
<Setter Property="Background" Value="Bisque"/>
</Style>
</Page.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
RowStyle="{StaticResource customRowStyle}"
ItemsSource="{Binding Orders}"/>
See Also
RowStyleSelector
Gets or sets the style applied to data row conditionally based on data in SfDataGrid.
Declaration
public StyleSelector RowStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to data row based on data. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a row, specify a TargetType of DataGridRowControl.
Examples
<Application.Resources>
<ResourceDictionary>
<local:CustomRowStyleSelector x:Key="rowStyleSelector" />
<Style x:Key="rowStyle1" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Bisque" />
</Style>
<Style x:Key="rowStyle2" TargetType="dataGrid:DataGridRowControl">
<Setter Property="Background" Value="Aqua" />
</Style>
</ResourceDictionary>
</Application.Resources>
<dataGrid:SfDataGrid x:Name="sfDataGrid"
ItemsSource="{Binding Orders}"
RowStyleSelector="{StaticResource rowStyleSelector}"/>
See Also
SelectedDetailsViewGrid
Gets or sets the DetailsViewDataGrid that are currently selected.
Declaration
public SfDataGrid SelectedDetailsViewGrid { get; set; }
Property Value
Type | Description |
---|---|
SfDataGrid | Returns the selected detailsview datagrid |
Remarks
You can access the properties and its values of selected details view datagrid through this property.
SelectionBackground
Gets or sets a brush that highlights the background of the currently selected row or cell.
Declaration
public Brush SelectionBackground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | The brush that highlights the background of the selected row or cell. |
See Also
SelectionController
Gets or sets the instance of IGridSelectionController which controls selection operations in SfDataGrid.
Declaration
public IGridSelectionController SelectionController { get; set; }
Property Value
Type | Description |
---|---|
IGridSelectionController | An instance of IGridSelectionController. |
Remarks
The default behavior of row or cell selection can be customized by assigning the class derived from GridCellSelectionController or GridSelectionController to SelectionController property.
See Also
SelectionForeground
Gets or sets a brush that highlights the foreground of currently selected row or cell.
Declaration
public Brush SelectionForeground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | The brush that highlights the foreground of selected row or cell. The default value is Black. |
See Also
SelectionUnit
Gets or sets a value that decides the type of selection behavior to be performed in SfDataGrid.
Declaration
public GridSelectionUnit SelectionUnit { get; set; }
Property Value
Type | Description |
---|---|
GridSelectionUnit | One of the GridSelectionUnit enumeration that specifies the type of selection behavior in SfDataGrid. The default value is Row. |
SerializationController
Gets or sets an instance of SerializationController which controls the serialization operation in SfDataGrid.
Declaration
public SerializationController SerializationController { get; set; }
Property Value
Type | Description |
---|---|
SerializationController | An instance of SerializationController class. |
Remarks
SerializationController class provides various properties and virtual methods to customize its operations.
See Also
ShowBusyIndicator
Gets or sets a value that indicates whether the busy indicator should be displayed while fetching the large amount data in VirtualizingCollectionView.
Declaration
public bool ShowBusyIndicator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the busy indicator is enabled; otherwise, false. The default value is true. |
ShowColumnWhenGrouped
Gets or sets a value that indicates whether the column is displayed on SfDataGrid after it is grouped.
Declaration
public bool ShowColumnWhenGrouped { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the column is displayed in SfDataGrid; otherwise, false. The default value is true. |
ShowDetailsViewIndentCell
Gets or sets a value that indicates the visibility of GridDetailsViewIndentCell in SfDataGrid.
Declaration
public bool ShowDetailsViewIndentCell { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the DetailsViewIndentCell is visible; otherwise, false. The default value is true. |
ShowGroupDropArea
Gets or sets a value that indicates whether the GroupDropArea is enabled in SfDataGrid.
Declaration
public bool ShowGroupDropArea { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the group drop area is enabled in SfDataGrid; otherwise, false. The default value is false. |
Remarks
To make the GroupDropArea always to be expanded through the IsGroupDropAreaExpanded property.
See Also
SortComparers
Gets the collection of comparers to sort the data based on custom logic.
Declaration
public SortComparers SortComparers { get; }
Property Value
Type | Description |
---|---|
SortComparers | Compares two SortComparer to perform sort operation based on custom logic. |
Remarks
A comparer that are added to SortComparers collection to apply custom Sorting based on the specified column name and sort direction.
SourceType
Gets or sets the type of data object displayed in SfDataGrid.
Declaration
public Type SourceType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | Returns the type of the Source. |
Remarks
Used to specify the type of data object for column population and data (sorting,grouping and filtering) when your data object have multilevel inheritance.
SummaryCalculationMode
Gets or sets a value that denotes the mode of calculation for caption and group summaries for improved performance.
Declaration
public SummaryCalculationModes SummaryCalculationMode { get; set; }
Property Value
Type | Description |
---|---|
SummaryCalculationModes | One of the SummaryCalculationModes that indicates when to perform the summary calculation. The default value isDefault. |
See Also
SummaryCalculationUnit
Gets or sets the value that specifies the mode for calculating summaries.
Declaration
public SummaryCalculationUnit SummaryCalculationUnit { get; set; }
Property Value
Type | Description |
---|---|
SummaryCalculationUnit | One of the SummaryCalculationUnit that indicates when to perform the summary calculation. The default value is AllRows. |
See Also
TableSummaryCellStyle
Gets or sets the style applied all the table summary cells in SfDataGrid.
Declaration
public Style TableSummaryCellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the table summary cells in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a table summary cell, specify a TargetType of GridTableSummaryCell.
Examples
<Page.Resources>
<Style x:Key="tableSummaryCellStyle" TargetType="syncfusion:GridTableSummaryCell">
<Setter Property = "Foreground" Value="DarkBlue" />
<Setter Property = "FontSize" Value="20" />
<Setter Property = "FontWeight" Value="Bold" />
<Setter Property = "FontStyle" Value="Italic" />
</Style>
</Page.Resources>
<syncfusion:SfDataGrid x:Name="dataGrid"
ItemsSource="{Binding Orders}"
TableSummaryCellStyle="{StaticResource tableSummaryCellStyle}" />
See Also
TableSummaryCellStyleSelector
Gets or sets the style applied to table summary cell conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector TableSummaryCellStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to table summary cell based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a table summary cell, specify a TargetType of GridTableSummaryCell.
See Also
TableSummaryContextFlyout
Gets or sets the shortcut menu that appears on table summary of SfDataGrid.
Declaration
public MenuFlyout TableSummaryContextFlyout { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.MenuFlyout | The shortcut menu for the table summary in SfDataGrid. The default value is null. |
Remarks
Command bound with MenuItem receives GridRecordContextFlyoutInfo as command parameter which contains the corresponding summary record.
TableSummaryRows
Gets or sets the collection of GridSummaryRow that displays the summary information either at top or bottom of SfDataGrid.
Declaration
public ObservableCollection<GridSummaryRow> TableSummaryRows { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<GridSummaryRow> | The collection of GridSummaryRow to display the summary information either at top or bottom of SfDataGrid. The default value is null. |
Remarks
The table summary can have more than one summary rows and the summary value calculated overall the records in SfDataGrid.
Examples
this.sfDataGrid.TableSummaryRows.Add(new GridTableSummaryRow()
{
ShowSummaryInRow = false,
SummaryColumns = new ObservableCollection<ISummaryColumn>()
{
new GridSummaryColumn()
{
Name = "PriceAmount",
MappingName = "UnitPrice",
SummaryType = SummaryType.DoubleAggregate,
Format = "Total UnitPrice : {Sum:c}"
},
new GridSummaryColumn()
{
Name = "OrderCount",
MappingName = "OrderID",
SummaryType = SummaryType.CountAggregate,
Format = "Total Count : {Count:d}"
},
}
});
See Also
TableSummaryRowStyle
Gets or sets the style applied to all the table summary rows in SfDataGrid.
Declaration
public Style TableSummaryRowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the table summary rows in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a TableSummaryRow, specify a TargetType of TableSummaryRowControl.
TableSummaryRowStyleSelector
Gets or sets the style applied to table summary row conditionally based on summary value in SfDataGrid.
Declaration
public StyleSelector TableSummaryRowStyleSelector { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Controls.StyleSelector | A Microsoft.UI.Xaml.Controls.StyleSelector object that chooses the style to table summary row based on summary value. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a TableSummaryRow, specify a TargetType of TableSummaryRowControl.
See Also
UnboundRowCellRenderers
Gets the reference to the GridCellRendererCollection instance which holds the renderer's for UnBoundRow Cell.
Declaration
public GridCellRendererCollection UnboundRowCellRenderers { get; }
Property Value
Type | Description |
---|---|
GridCellRendererCollection | Instance which holds the collection of Unbound cell renderers GridFilterRowCellRenderer<D, E>. |
Remarks
The GridUnboundCellTextBoxRenderer class provides various properties and virtual methods to customize its operations.The customized GridUnboundRowCellTextBoxRenderer should be replaced to UnboundRowCellRenderers. The below table shows the predefined renderers that associated with UnboundRowCell and its corresponding cell type.
Renderer Class | Cell Type |
---|---|
GridUnboundRowCellTemplateRenderer | UnboundTemplateColumn"/> |
GridUnboundRowCellTextBoxRenderer | UnboundTextColumn |
UnboundRowCellStyle
Gets or sets the style applied to all the cells in UnboundRow.
Declaration
public Style UnboundRowCellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the cells in UnboundRow. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style to cell in UnboundRow, specify a TargetType of GridUnboundRowCell.
See Also
UnboundRows
Gets or sets the collection of GridUnboundRow which denotes the count and position of additional rows at top and bottom of SfDataGrid. These additional rows are not bound to data source of SfDataGrid.
Declaration
public UnboundRows UnboundRows { get; set; }
Property Value
Type | Description |
---|---|
UnboundRows | The collection of GridUnboundRow to add additional rows to display the custom information in SfDataGrid. The default value is null. |
Remarks
Populate unbound rows data by handling QueryUnboundRow event.
See Also
UnboundRowStyle
Gets or sets the style applied to all the UnboundRows in SfDataGrid.
Declaration
public Style UnboundRowStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Style | The style that is applied to all the UnboundRows in SfDataGrid. The default value is null. |
Remarks
To define a Microsoft.UI.Xaml.Style for a UnboundRow, specify a TargetType of UnboundRowControl.
See Also
UsePLINQ
Gets or sets the value that indicates whether to enable Parallel LINQ while sorting, filtering, grouping and summary calculation to improve performance.
Declaration
public bool UsePLINQ { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the Parallel LINQ is enabled; otherwise, false. The default value is false. |
See Also
View
Gets the reference to the ICollectionViewAdv instance which manage the records, sorting, grouping, summaries and filtering in SfDataGrid.
Declaration
public ICollectionViewAdv View { get; }
Property Value
Type | Description |
---|---|
ICollectionViewAdv | View is responsible for maintain and manipulation data and other advanced operations like Sorting, Grouping, Filtering and etc. |
Remarks
View will be created based on ItemsSource you are setting. Below are the list of CollectionViews available in SfDataGrid.
Methods
ArrangeOverride(Size)
Arranges the content of the SfDataGrid.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | finalSize | The computed size that is used to arrange the content. |
Returns
Type | Description |
---|---|
Windows.Foundation.Size | The size consumed by SfDataGrid. |
ClearFilter(GridColumn)
Clears filters for the particular column.
Declaration
public void ClearFilter(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column | The corresponding GridColumn to clear the filters. |
Remarks
This is the programmatic way to clear the filters for the particular column.
ClearFilter(String)
Clears filters for the particular column.
Declaration
public void ClearFilter(string columnName)
Parameters
Type | Name | Description |
---|---|---|
System.String | columnName | The corresponding column's MappingName to clear filters. |
Remarks
This is the programmatic way to clear the filtering for the particular column.The columnName should be valid MappingName of the column.
ClearFilters()
Clears filters for all the columns in SfDataGrid.
Declaration
public void ClearFilters()
Remarks
This method will clear the filters programmatically.
ClearSelections(Boolean)
Clears all the selection present in SfDataGrid.
Declaration
public void ClearSelections(bool exceptCurrentRow)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | exceptCurrentRow | Indicates whether the selection should be cleared for the current row or not. |
Remarks
This method helps to clear the selection programmatically.
CollapseAllDetailsView()
Collapses all the DetailsViewDataGrids in SfDataGrid.
Declaration
public void CollapseAllDetailsView()
CollapseAllGroup()
Collapses all the groups in SfDataGrid.
Declaration
public void CollapseAllGroup()
Remarks
This method collapse all the groups in SfDataGrid programmatically.
CollapseDetailsViewAt(Int32)
Collapses the DetailsViewDataGrids corresponding to the specified record index.
Declaration
public void CollapseDetailsViewAt(int recordIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | recordIndex | Index of the record to collapse the Details View. |
CollapseGroup(Group)
Collapses the specified Group.
Declaration
public void CollapseGroup(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | Specifies the group to collapse it from view. |
Examples
var group = dataGrid.View.Groups[0] as Group;
this.dataGrid.CollapseGroup(group);
CollapseGroupsAtLevel(Int32)
Collapses the group based on its level.
Declaration
public void CollapseGroupsAtLevel(int groupLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | groupLevel | Specifies the group level to collapse the group. |
Examples
this.dataGrid.CollapseGroupsAtLevel(2);
Deserialize(Stream)
Deserializes the SfDataGrid based on the XML document contained by the specified Stream.
Declaration
public void Deserialize(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Specifies the System.IO.Stream that contains the XML document to deserialize. |
Deserialize(Stream, DeserializationOptions)
Deserializes the SfDataGrid based on the XML document of the specified Stream with DeserializationOptions.
Declaration
public void Deserialize(Stream stream, DeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Specifies the System.IO.Stream that contains the XML document to deserialize. |
DeserializationOptions | options | Specifies the SerializationOptions to decide the type of operations such as sorting, filtering, and etc to be deserialized. |
Deserialize(StorageFile)
Deserializes the SfDataGrid based on the XML document in the specified storageFile.
Declaration
public void Deserialize(StorageFile storageFile)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.StorageFile | storageFile | The Windows.Storage.StorageFile that contains the XML document to deserialize. |
Deserialize(StorageFile, DeserializationOptions)
Deserializes the SfDataGrid based on the XML document specified in the Stream with the DeserializationOptions.
Declaration
public void Deserialize(StorageFile storageFile, DeserializationOptions deserializationOptions)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.StorageFile | storageFile | The storageFile that contains the XML document to deserialize. |
DeserializationOptions | deserializationOptions | The options for specifying the type of operations such as sorting, filtering, and etc to be deserialized. |
Dispose(Boolean)
Disposes all the resources used by the SfDataGrid class.
Declaration
protected override void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Specifies that need to disposed or not. |
Overrides
DisposeViewOnItemsSourceChanged()
Releases all the view related operations in SfDataGrid, when the ItemsSource is changed.
Declaration
protected virtual void DisposeViewOnItemsSourceChanged()
EnsureProperties()
Ensures RowHeight, HeaderRowHeight, GroupDropAreaText, GridValidationMode, AllowFiltering properties associated with SfDataGrid.
Declaration
protected void EnsureProperties()
EnsureViewProperties()
Ensures selection related operations in View.
Declaration
protected void EnsureViewProperties()
ExpandAllDetailsView()
Expands all the DetailsViewDataGrids in the SfDataGrid.
Declaration
public void ExpandAllDetailsView()
ExpandAllDetailsView(Int32)
Expands the DetailsViewDataGrid corresponding up to specified level.
Declaration
public void ExpandAllDetailsView(int level)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | Specifies the level of the detailview. |
ExpandAllGroup()
Expands all the groups in SfDataGrid.
Declaration
public void ExpandAllGroup()
Remarks
This method expand all the groups in SfDataGrid programmatically.
ExpandDetailsViewAt(Int32)
Expands the DetailsViewDataGrid corresponding to the specified record index.
Declaration
public bool ExpandDetailsViewAt(int recordIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | recordIndex | Index of the record to expand the Details View. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the record is expanded. otherwise false. |
ExpandGroup(Group)
Expands the specified group.
Declaration
public void ExpandGroup(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | Specifies the group to expand it from view. |
Examples
var group = dataGrid.View.Groups[0] as Group;
this.dataGrid.ExpandGroup(group);
ExpandGroupsAtLevel(Int32)
Expands the group based on its level.
Declaration
public void ExpandGroupsAtLevel(int groupLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | groupLevel | Specifies the group level to expand the group. |
Examples
this.dataGrid.ExpandGroupsAtLevel(2);
GetHeaderCell(GridColumn)
Gets the header cell element for the specified column.
Declaration
public GridHeaderCellControl GetHeaderCell(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column | Specifies the corresponding column to get header cell element. |
Returns
Type | Description |
---|---|
GridHeaderCellControl | Returns the GridHeaderCellControl element for the specified column. |
GetSelectedCells()
Gets the collection of selected cells in SfDataGrid.
Declaration
public List<GridCellInfo> GetSelectedCells()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<GridCellInfo> | Returns the collection of GridCellInfo that contains the selected cells in SfDataGrid. |
GetUnboundCellValue(GridColumn, Object)
Gets the cell value to populate the UnboundColumn by evaluating the expression or Format with the record.
Declaration
public object GetUnboundCellValue(GridColumn column, object record)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column | Specifies the corresponding column to get the cell value. |
System.Object | record | Specifies the corresponding record to get the cell value. |
Returns
Type | Description |
---|---|
System.Object | Returns the cell value of the specified column based on Expression or Format with record. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the GridUnBoundColumn is defined with Expression for DataTable. |
InvalidateRowHeight(Int32)
Invalidates the height of the specified row to raise in the QueryRowHeight event programmatically.
Declaration
public void InvalidateRowHeight(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | specifies the corresponding row index to invalidate its row height. |
Remarks
Resets the particular row height. Once row heights are reset, need to call the InvalidateMeasureInfo method of VisualContainer to refresh the view.
Examples
using Syncfusion.UI.Xaml.Grid.Helpers;
dataGrid.InvalidateRowHeight(2);
dataGrid.GetVisualContainer().InvalidateMeasureInfo();
InValidateUnboundRow(GridUnboundRow, Boolean)
Invalidates the unbound row to refresh the data in View.
Declaration
public void InValidateUnboundRow(GridUnboundRow unboundRow, bool canInvalidateColumn = true)
Parameters
Type | Name | Description |
---|---|---|
GridUnboundRow | unboundRow | Specifies the GridUnboundRow to be invalidated. |
System.Boolean | canInvalidateColumn | Specifies to whether to in invalidate columns or not. |
IsChanged(DependencyProperty)
Invoked when the dependency property on SfDataGrid has been updated.
Declaration
protected bool IsChanged(DependencyProperty dependencyProperty)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.DependencyProperty | dependencyProperty | The dependencyproperty that describes the property that changed. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the dependency property on SfDataGrid has been updates; otherwise, false. |
MeasureOverride(Size)
Determines the desired size of the SfDataGrid.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | availableSize | The size that the SfDataGrid can occupy. |
Returns
Type | Description |
---|---|
Windows.Foundation.Size | The desired size of SfDataGrid. |
MoveCurrentCell(RowColumnIndex, Boolean)
Moves the current cell for the specified rowColumnIndex.
Declaration
public void MoveCurrentCell(RowColumnIndex rowColumnIndex, bool needToClearSelection = true)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Specifies the corresponding rowColumnIndex to move the current cell. |
System.Boolean | needToClearSelection | Indicates whether the current selection to be cleared while moving the current cell. |
Remarks
This method is not applicable when the SelectionUnit and NavigationMode is Row.
OnApplyTemplate()
Builds the visual tree for the SfDataGrid when a new template is applied.
Declaration
protected override void OnApplyTemplate()
OnContainerKeyDown(KeyRoutedEventArgs)
Invoked when the ContainerKeyDown
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected bool OnContainerKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.KeyRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.KeyRoutedEventArgs that contains the event data. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the container key is pressed; otherwise, false. |
OnCreateAutomationPeer()
Creates and returns an DataGridAutomationPeer object for the SfDataGrid.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer | Returns new instance of DataGridAutomationPeer for the SfDataGrid. |
OnDependencyPropertyChanged(String, DependencyPropertyChangedEventArgs)
Occurs when any DependencyProperty type property changes.
Declaration
public void OnDependencyPropertyChanged(string propertyName, DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The string that specifies the property name. |
Microsoft.UI.Xaml.DependencyPropertyChangedEventArgs | e | An DependencyPropertyChangedEventArgs object that contains the event data. |
OnKeyDown(KeyRoutedEventArgs)
Invoked when the KeyDown
attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.KeyRoutedEventArgs | e | The Windows.UI.Xaml.Input.KeyRoutedEventArgs that contains the event data. |
Remarks
Handling the keydown operations of SfDataGrid
OnManipulationStarted(ManipulationStartedRoutedEventArgs)
Invoked when the ManipulationStarted
attached event reaches an element in its route that is derived from this class.
Implement this method to add class handling for this event.
Declaration
protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.ManipulationStartedRoutedEventArgs | e | The Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs that contains the event data. |
Print()
Prints the SfDataGrid with the given PrintSettings.
Declaration
public void Print()
RefreshContainerAndView()
Refreshes VisualContainer and View properties based on SfDataGrid property settings.
Declaration
protected virtual void RefreshContainerAndView()
Examples
The View.CurrentItem updated based on SfDataGrid.CurrentItem property.
RefreshHeaderLineCount()
Updates the frozen rows count when the internal rows such as AddNewRow, Header, Unbound Row and TableSummaryRow is created.
Declaration
protected virtual void RefreshHeaderLineCount()
ResetUnboundRowIndex()
Resets the row index of UnboundRow and its maintained for internal purpose.
Declaration
protected void ResetUnboundRowIndex()
ResumeNotifyListener()
Resumes the notification for the changes in DetailsView.
Declaration
public void ResumeNotifyListener()
ScrollInView(RowColumnIndex)
Scrolls the SfDataGrid vertically and horizontally to display the cell for the specified RowColumnIndex.
Declaration
public void ScrollInView(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Specifies the rowColumnIndex of the cell to scroll into view. |
SelectAll(Boolean)
Selects all the cells in SfDataGrid.
Declaration
public void SelectAll(bool canFocus = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | canFocus | Decides whether the focus can be set to the current cell. |
Remarks
This method only works if the SelectionMode is Multiple or Extended.
SelectCell(Object, GridColumn, Boolean)
Selects the cell for the specified row data and column.
Declaration
public void SelectCell(object rowData, GridColumn column, bool canFocus = true)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | Specifies the corresponding rowData to select the cell. |
GridColumn | column | Specifies the corresponding column to select the cell. |
System.Boolean | canFocus | Decides whether the focus can be set to the current cell. |
SelectCells(Object, GridColumn, Object, GridColumn, Boolean)
Selects the range of cells for the specified row data and column information.
Declaration
public void SelectCells(object startRowData, GridColumn startColumn, object endRowData, GridColumn endColumn, bool canFocus = true)
Parameters
Type | Name | Description |
---|---|---|
System.Object | startRowData | Specifies the top position of the range to select the cells. |
GridColumn | startColumn | Specifies the left position of the range to select the cells. |
System.Object | endRowData | Specifies the bottom position of the range to select the cells.. |
GridColumn | endColumn | Specifies the right position of the range to select the cells. |
System.Boolean | canFocus | Decides whether the focus can be set to the current cell. |
Remarks
This method is not applicable for Single and None selection mode.
SelectRows(Int32, Int32)
Selects the row based on its specified the start and end index .
Declaration
public void SelectRows(int startRowIndex, int endRowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startRowIndex | Specifies the start index of the row to select. |
System.Int32 | endRowIndex | Specifies the end index of the row to select. |
Remarks
This is applicable for Multiple and Extended selection mode.
Serialize(Stream)
Serializes the SfDataGrid control to the XML document file that are stored in the specified Stream.
Declaration
public void Serialize(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Specifies the System.IO.Stream used to write the XML document file. |
Serialize(Stream, SerializationOptions)
Serializes the SfDataGrid with SerializationOptions to the XML document file that are stored in the specified Stream.
Declaration
public void Serialize(Stream stream, SerializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Specifies System.IO.Stream used to write XML document file. |
SerializationOptions | options | Specifies the SerializationOptions to decide the type of operations such as sorting, filtering, and etc to be serialized. |
Serialize(StorageFile)
Serializes the SfDataGrid to the XML document file that are stored in the specified storageFile.
Declaration
public void Serialize(StorageFile storageFile)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.StorageFile | storageFile | The Windows.Storage.StorageFile used to write XML document. |
Serialize(StorageFile, SerializationOptions)
Serializes the SfDataGrid control to the XML document file that are stored in the specified storageFile with SerializationOptions.
Declaration
public void Serialize(StorageFile storageFile, SerializationOptions serializationOptions)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.StorageFile | storageFile | The Windows.Storage.StorageFile used to write XML document. |
SerializationOptions | serializationOptions | Specifies the SerializationOptions to decide the type of operations such as sorting, filtering, and etc to be deserialized. |
SetNotifierListener(IDetailsViewNotifyListener)
Sets the listener that notifies the changes in DetailsView.
Declaration
public void SetNotifierListener(IDetailsViewNotifyListener notifyListener)
Parameters
Type | Name | Description |
---|---|---|
IDetailsViewNotifyListener | notifyListener |
SetRowGenerator()
Initialize a new instance of RowGenerator.
Declaration
protected virtual void SetRowGenerator()
SuspendNotifyListener()
Suspends the notification for the changes in DetailsView.
Declaration
public void SuspendNotifyListener()
UnselectCell(Object, GridColumn)
Unselects the cell with corresponding to the specified row data and column.
Declaration
public void UnselectCell(object rowData, GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | Specifies the corresponding rowData to unselect. |
GridColumn | column | Specifies the corresponding column to unselect. |
UnselectCells(Object, GridColumn, Object, GridColumn)
Unselects the range of cells for the specified row data and column information.
Declaration
public void UnselectCells(object startRowData, GridColumn startColumn, object endRowData, GridColumn endColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Object | startRowData | Specifies the top position of the range to unselect. |
GridColumn | startColumn | Specifies the left position of the range to unselect. |
System.Object | endRowData | Specifies the bottom position of the range to unselect. |
GridColumn | endColumn | Specifies the right position of the range to unselect. |
Remarks
This method is not applicable for Single and None selection mode.
UnWireEvents()
Unwires the events associated with the SfDataGrid.
Declaration
protected virtual void UnWireEvents()
UpdateAutoScroller()
Updates the AutoScroller settings.
Declaration
protected void UpdateAutoScroller()
WireEvents()
Wires the events associated with the SfDataGrid.
Declaration
protected virtual void WireEvents()
Events
AddNewRowInitiating
Occurs when the AddNewRow is being initiated.
Declaration
public event EventHandler<AddNewRowInitiatingEventArgs> AddNewRowInitiating
Event Type
Type |
---|
System.EventHandler<AddNewRowInitiatingEventArgs> |
Remarks
You can set the default value for the AddNewRow is being initiated through the AddNewRowInitiatingEventArgs event argument.
See Also
AutoGeneratingColumn
Occurs when column is generated for the properties in underlying data object.
Declaration
public event EventHandler<AutoGeneratingColumnArgs> AutoGeneratingColumn
Event Type
Type |
---|
System.EventHandler<AutoGeneratingColumnArgs> |
Remarks
You can cancel or customize the column being created using the AutoGeneratingColumnArgs event argument.
Examples
// Wired the Autogeneratingcolumn event.
this.dataGrid.AutoGeneratingColumn += dataGrid_AutoGeneratingColumn;
// Occurs while column is generated.
void dataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnArgs e)
{
if (e.Column.MappingName == "UnitPrice")
{
       // To change the column type
       if (e.Column is GridNumericColumn)
{
e.Column = new GridTextColumn() { MappingName = "UnitPrice", HeaderText = "Unit Price" };
}
}
else if (e.Column.MappingName == "OrderID")
{
//To cancel the autogeneration of column.
e.Cancel = true;
}
else if (e.Column.MappingName == "CustomerID")
{
       // To customize the column properties.
       e.Column.AllowEditing = false;
e.Column.AllowDragging = true;
}
}
AutoGeneratingRelations
Occurs when the relations for Master-Details View is generated automatically.
Declaration
public event EventHandler<AutoGeneratingRelationsArgs> AutoGeneratingRelations
Event Type
Type |
---|
System.EventHandler<AutoGeneratingRelationsArgs> |
Remarks
This event will be raised when the AutoGenerateRelations is set to true and relation is auto generated.You can cancel or customize the Master-Details View relation being generated through the AutoGeneratingRelationsArgs event argument.
See Also
CellDoubleTapped
Occurs when the user double clicks or touch the cell in SfDataGrid.
Declaration
public event EventHandler<GridCellDoubleTappedEventArgs> CellDoubleTapped
Event Type
Type |
---|
System.EventHandler<GridCellDoubleTappedEventArgs> |
Remarks
CellDoubleTapped does not occurs when the end user double clicks or touch the non-selectable cells.
See Also
CellTapped
Occurs when the user clicks or touch the cell in SfDataGrid.
Declaration
public event EventHandler<GridCellTappedEventArgs> CellTapped
Event Type
Type |
---|
System.EventHandler<GridCellTappedEventArgs> |
Remarks
CellTapped does not occurs when the end user clicks or touch the non-selectable cells.
See Also
CellToolTipOpening
Occurs when the user hover the mouse on the cell in SfDataGrid.
Declaration
public event EventHandler<GridCellToolTipOpeningEventArgs> CellToolTipOpening
Event Type
Type |
---|
System.EventHandler<GridCellToolTipOpeningEventArgs> |
Remarks
CellToolTipOpening does not occurs when the tooltip not enabled for the cells.
ColumnDragging
Occurs when the column is being reordered in to a new position.
Declaration
public event EventHandler<QueryColumnDraggingEventArgs> ColumnDragging
Event Type
Type |
---|
System.EventHandler<QueryColumnDraggingEventArgs> |
Remarks
You can cancel or customize the column being dragged through QueryColumnDraggingEventArgs event argument.
CopyGridCellContent
Occurs when each cell in the selected cells or rows being copied from SfDataGrid into clipboard.
Declaration
public event EventHandler<GridCopyPasteCellEventArgs> CopyGridCellContent
Event Type
Type |
---|
System.EventHandler<GridCopyPasteCellEventArgs> |
Remarks
You can cancel or customize each cell is being copied from the selected cells or rows through GridCopyPasteCellEventArgs event argument.
CurrentCellActivated
Occurs after the current cell is activated in SfDataGrid.
Declaration
public event EventHandler<CurrentCellActivatedEventArgs> CurrentCellActivated
Event Type
Type |
---|
System.EventHandler<CurrentCellActivatedEventArgs> |
Remarks
This event occurs after the CurrentCellActivating event if that event is not canceled.
CurrentCellActivating
Occurs when the current cell is being activated in SfDataGrid.
Declaration
public event EventHandler<CurrentCellActivatingEventArgs> CurrentCellActivating
Event Type
Type |
---|
System.EventHandler<CurrentCellActivatingEventArgs> |
Remarks
You can cancel the current cell is being activated through the CurrentCellActivatingEventArgs event argument.
CurrentCellBeginEdit
Occurs when the edit mode starts for the current cell in SfDataGrid.
Declaration
public event EventHandler<CurrentCellBeginEditEventArgs> CurrentCellBeginEdit
Event Type
Type |
---|
System.EventHandler<CurrentCellBeginEditEventArgs> |
Remarks
You can cancel the current cell is being edited through the CurrentCellBeginEditEventArgs event argument.
CurrentCellDropDownSelectionChanged
Occurs when the SelectedItem changed in the drop down of GridMultiColumnDropDownList or GridComboBoxColumn.
Declaration
public event EventHandler<CurrentCellDropDownSelectionChangedEventArgs> CurrentCellDropDownSelectionChanged
Event Type
Type |
---|
System.EventHandler<CurrentCellDropDownSelectionChangedEventArgs> |
Remarks
You can get the selectedItem of dropdown by using the CurrentCellDropDownSelectionChangedEventArgs event argument.
CurrentCellEndEdit
Occurs when the edit mode ends for the current cell.
Declaration
public event EventHandler<CurrentCellEndEditEventArgs> CurrentCellEndEdit
Event Type
Type |
---|
System.EventHandler<CurrentCellEndEditEventArgs> |
Remarks
You can customize the current cell values after is getting committed by using the CurrentCellEndEditEventArgs event argument.
CurrentCellRequestNavigate
Occurs when the GridHyperLinkColumn's cell is request for navigation.
Declaration
public event EventHandler<CurrentCellRequestNavigateEventArgs> CurrentCellRequestNavigate
Event Type
Type |
---|
System.EventHandler<CurrentCellRequestNavigateEventArgs> |
Remarks
You can customize the GridHyperLinkColumn's navigation text by using the CurrentCellRequestNavigateEventArgs event argument.
CurrentCellValidated
Occurs when the current cell is validated.
Declaration
public event EventHandler<CurrentCellValidatedEventArgs> CurrentCellValidated
Event Type
Type |
---|
System.EventHandler<CurrentCellValidatedEventArgs> |
Remarks
This event occurs after the CurrentCellValidating event if that event is not canceled.
CurrentCellValidating
Occurs while moving to other cells from edited cell for validating the user input.
Declaration
public event EventHandler<CurrentCellValidatingEventArgs> CurrentCellValidating
Event Type
Type |
---|
System.EventHandler<CurrentCellValidatingEventArgs> |
Remarks
You can cancel or customize the current cell being validated through the CurrentCellValidatingEventArgs event argument.
CurrentCellValueChanged
Occurs when the current cell value Changes.
Declaration
public event EventHandler<CurrentCellValueChangedEventArgs> CurrentCellValueChanged
Event Type
Type |
---|
System.EventHandler<CurrentCellValueChangedEventArgs> |
Remarks
You can customize the sfdatagrid when the current cell value is changed by CurrentCellValueChangedEventArgs using the event argument.
DetailsViewCollapsed
Occurs after the DetailsViewDataGrid is collapsed.
Declaration
public event EventHandler<GridDetailsViewCollapsedEventArgs> DetailsViewCollapsed
Event Type
Type |
---|
System.EventHandler<GridDetailsViewCollapsedEventArgs> |
Remarks
You can access the record through the GridDetailsViewCollapsedEventArgs event argument.
See Also
DetailsViewCollapsing
Occurs when the DetailsViewDataGrid is being collapsed.
Declaration
public event EventHandler<GridDetailsViewCollapsingEventArgs> DetailsViewCollapsing
Event Type
Type |
---|
System.EventHandler<GridDetailsViewCollapsingEventArgs> |
Remarks
You can cancel or customize the details view being collapsed through GridDetailsViewCollapsingEventArgs event argument.
See Also
DetailsViewExpanded
Occurs after the DetailsViewDataGrid is expanded.
Declaration
public event EventHandler<GridDetailsViewExpandedEventArgs> DetailsViewExpanded
Event Type
Type |
---|
System.EventHandler<GridDetailsViewExpandedEventArgs> |
Remarks
You can access the record and DetailsViewItemsSource through the GridDetailsViewExpandedEventArgs event argument.
See Also
DetailsViewExpanding
Occurs when the DetailsViewDataGrid is being expanded.
Declaration
public event EventHandler<GridDetailsViewExpandingEventArgs> DetailsViewExpanding
Event Type
Type |
---|
System.EventHandler<GridDetailsViewExpandingEventArgs> |
Remarks
You can cancel or customize the DetailsViewDataGrid being expanded through GridDetailsViewExpandingEventArgs event argument.
See Also
DetailsViewLoading
Occurs when the DetailsViewDataGrid is being loaded in to view.
Declaration
public event EventHandler<DetailsViewLoadingAndUnloadingEventArgs> DetailsViewLoading
Event Type
Type |
---|
System.EventHandler<DetailsViewLoadingAndUnloadingEventArgs> |
Remarks
You can set the custom renderer, SelectionController ResizingController, GridColumnDragDropController and GridColumnSizer to the DetailsViewDataGrid through the DetailsViewDataGrid argument in the DetailsViewLoadingAndUnloadingEventArgs class.
DetailsViewUnloading
Occurs when the DetailsViewDataGrid is being unloaded from the view.
Declaration
public event EventHandler<DetailsViewLoadingAndUnloadingEventArgs> DetailsViewUnloading
Event Type
Type |
---|
System.EventHandler<DetailsViewLoadingAndUnloadingEventArgs> |
Remarks
You can set the custom renderer, SelectionController ResizingController, GridColumnDragDropController and GridColumnSizer to the DetailsViewDataGrid through the DetailsViewDataGrid argument in the DetailsViewLoadingAndUnloadingEventArgs class.
ExternalExceptionThrown
Occurs when external exception is thrown.
Declaration
public event EventHandler<ExternalExceptionThrownEventArgs> ExternalExceptionThrown
Event Type
Type |
---|
System.EventHandler<ExternalExceptionThrownEventArgs> |
FilterChanged
Occurs after the column is filtered in SfDataGrid.
Declaration
public event EventHandler<GridFilterEventArgs> FilterChanged
Event Type
Type |
---|
System.EventHandler<GridFilterEventArgs> |
Remarks
This event occurs after the FilterChanging event if that event is not canceled.
FilterChanging
Occurs when the column is being filtered in SfDataGrid.
Declaration
public event EventHandler<GridFilterEventArgs> FilterChanging
Event Type
Type |
---|
System.EventHandler<GridFilterEventArgs> |
Remarks
You can cancel or customize the column being filtered through GridFilterEventArgs event argument.
FilterItemsPopulated
Occurs after the items is populated to the FilterControl in SfDataGrid.
Declaration
public event EventHandler<GridFilterItemsPopulatedEventArgs> FilterItemsPopulated
Event Type
Type |
---|
System.EventHandler<GridFilterItemsPopulatedEventArgs> |
Remarks
This event occurs after the FilterItemsPopulating event if that event is not canceled.
FilterItemsPopulating
Occurs when the items is being populated to the FilterControl in SfDataGrid.
Declaration
public event EventHandler<GridFilterItemsPopulatingEventArgs> FilterItemsPopulating
Event Type
Type |
---|
System.EventHandler<GridFilterItemsPopulatingEventArgs> |
Remarks
You can customize the data source of FilterControl being populated through the GridFilterItemsPopulatingEventArgs event argument.
GridContextFlyoutOpening
Occurs when any shortcut menu on the SfDataGrid is opening.
Declaration
public event EventHandler<GridContextFlyoutEventArgs> GridContextFlyoutOpening
Event Type
Type |
---|
System.EventHandler<GridContextFlyoutEventArgs> |
Remarks
You can handle or change the shortcut menu being opened through the GridContextFlyoutEventArgs event argument.
GridCopyContent
Occurs when the selected cells or rows in SfDataGrid is being copied in to clipboard.
Declaration
public event EventHandler<GridCopyPasteEventArgs> GridCopyContent
Event Type
Type |
---|
System.EventHandler<GridCopyPasteEventArgs> |
Remarks
You can cancel or customize the content being copied from a SfDataGrid through GridCopyPasteEventArgs event argument.
GridPasteContent
Occurs when the clipboard value is being pasted to SfDataGrid.
Declaration
public event EventHandler<GridCopyPasteEventArgs> GridPasteContent
Event Type
Type |
---|
System.EventHandler<GridCopyPasteEventArgs> |
Remarks
You can cancel or customize the content is being pasted from clipboard to SfDataGrid through GridCopyPasteEventArgs event argument.
GroupCollapsed
Occurs after the group is collapsed.
Declaration
public event EventHandler<GroupChangedEventArgs> GroupCollapsed
Event Type
Type |
---|
System.EventHandler<GroupChangedEventArgs> |
Remarks
This event occurs after the GroupCollapsing event if that event is not canceled and it will not raise when the group is collapsed programmatically.
See Also
GroupCollapsing
Occurs when the group is being collapsed.
Declaration
public event EventHandler<GroupChangingEventArgs> GroupCollapsing
Event Type
Type |
---|
System.EventHandler<GroupChangingEventArgs> |
Remarks
You can cancel or customize the group being collapsed through GroupChangingEventArgs event argument and it will not raise when the group is collapsed programmatically.
See Also
GroupExpanded
Occurs after the group is expanded.
Declaration
public event EventHandler<GroupChangedEventArgs> GroupExpanded
Event Type
Type |
---|
System.EventHandler<GroupChangedEventArgs> |
Remarks
This event occurs after the GroupExpanding event if that event is not canceled and it will not raised when the group is expanded programmatically.
See Also
GroupExpanding
Occurs when the group is being expanded.
Declaration
public event EventHandler<GroupChangingEventArgs> GroupExpanding
Event Type
Type |
---|
System.EventHandler<GroupChangingEventArgs> |
Remarks
You can cancel or customize the group being expanded through GroupChangingEventArgs event argument and it will not raised when the group is expanded programmatically.
See Also
ItemsSourceChanged
Occurs when the datagrid ItemsSource is changed.
Declaration
public event EventHandler<GridItemsSourceChangedEventArgs> ItemsSourceChanged
Event Type
Type |
---|
System.EventHandler<GridItemsSourceChangedEventArgs> |
Remarks
Here you can access the View from GridItemsSourceChangedEventArgs.
PasteGridCellContent
Occurs when each cell is being pasted from clipboard to SfDataGrid control.
Declaration
public event EventHandler<GridCopyPasteCellEventArgs> PasteGridCellContent
Event Type
Type |
---|
System.EventHandler<GridCopyPasteCellEventArgs> |
Remarks
You can cancel or customize each cell is being pasted from the clipboard through GridCopyPasteCellEventArgs event argument.
PrintTaskRequested
Occurs when users call the Print() method to print the datagrid.
Declaration
public event EventHandler<DataGridPrintTaskRequestedEventArgs> PrintTaskRequested
Event Type
Type |
---|
System.EventHandler<DataGridPrintTaskRequestedEventArgs> |
Remarks
You can use this event to customize the display options of the Windows.Graphics.Printing.PrintTask. SfDataGrid provides built-in support to print the range of pages by adding the Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges option to the e.PrintTask.Options.DisplayedOptions property. You can also add all other available options in theWindows.Graphics.Printing.StandardPrintTaskOptions and do the customization to support all other options in this event. You have to call the Windows.Graphics.Printing.PrintTaskRequest.CreatePrintTask(System.String,Windows.Graphics.Printing.PrintTaskSourceRequestedHandler) method using Request property.While performing the custom operation in this event, you have to set the PrintDocumentSource property in Windows.Graphics.Printing.PrintTaskSourceRequestedArgs.SetSource which is the event args for event handler available in Windows.Graphics.Printing.PrintTaskRequest.CreatePrintTask(System.String,Windows.Graphics.Printing.PrintTaskSourceRequestedHandler) method.
Examples
The below code example shows how to add the page range options in print dialog.
this.sfDataGrid.PrintTaskRequested += PrintTaskRequested;
void PrintTaskRequested (object sender, DataGridPrintTaskRequestedEventArgs e)
{
e.PrintTask = e.Request.CreatePrintTask("Printing", sourceRequested =>
{
PrintTaskOptionDetails printDetailedOptions = PrintTaskOptionDetails.GetFromPrintTaskOptions(e.PrintTask.Options);
IList<string> displayedOptions = printDetailedOptions.DisplayedOptions;
displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges);
e.PrintTask.Options.PageRangeOptions.AllowCurrentPage = true;
e.PrintTask.Options.PageRangeOptions.AllowAllPages = true;
e.PrintTask.Options.PageRangeOptions.AllowCustomSetOfPages = true;
// Set the datagrid’s print document source
sourceRequestedArgs.SetSource(e.PrintDocumentSource);
});
}
The following example shows how to disable the print preview in dialog,
this.sfDataGrid.PrintTaskRequested += PrintTaskRequested;
void PrintTaskRequested (object sender, DataGridPrintTaskRequestedEventArgs e)
{
e.PrintTask = e.Request.CreatePrintTask("Printing", sourceRequested =>
{
// Set the datagrid’s print document source
sourceRequestedArgs.SetSource(e.PrintDocumentSource);
});
e.PrintTask.IsPreviewEnabled = false;
}
QueryCoveredRange
Occurs to query the range to merge, for particular cell.
Declaration
public event EventHandler<GridQueryCoveredRangeEventArgs> QueryCoveredRange
Event Type
Type |
---|
System.EventHandler<GridQueryCoveredRangeEventArgs> |
Remarks
You can merge the adjacent cells by using the GridQueryCoveredRangeEventArgs event arguements.
QueryDetailsViewExpanderState
Occurs when the state of the detailsview expander cell is being changed.
Declaration
public event EventHandler<QueryDetailsViewExpanderStateEventArgs> QueryDetailsViewExpanderState
Event Type
Type |
---|
System.EventHandler<QueryDetailsViewExpanderStateEventArgs> |
Remarks
You can set the visibility to the expander of DetailsViewDataGrid. And also you can access the record and IsExpanded state of DetailsViewDataGrid through QueryDetailsViewExpanderStateEventArgs event argument.
See Also
QueryRowHeight
Occurs to query the row height based on row index. This event triggered only for visible rows.
Declaration
public event EventHandler<QueryRowHeightEventArgs> QueryRowHeight
Event Type
Type |
---|
System.EventHandler<QueryRowHeightEventArgs> |
Remarks
You can return the row height based on cell content using GetAutoRowHeight(Int32, GridRowSizingOptions, out Double, Boolean) method.
QueryUnboundColumnValue
Occurs to query or commit the values for GridUnboundColumn when its cells is initialized or committed. Occurs when the value of each cell in GridUnboundColumn being initialized or committed.
Declaration
public event EventHandler<GridUnboundColumnEventsArgs> QueryUnboundColumnValue
Event Type
Type |
---|
System.EventHandler<GridUnboundColumnEventsArgs> |
Remarks
You can customize the value of GridUnboundColumn being initialized in the QueryUnboundColumnValue event handler.
See Also
QueryUnboundRow
Occurs to query and commit the value and settings for cell in Unbound row.
Declaration
public event EventHandler<GridUnboundRowEventsArgs> QueryUnboundRow
Event Type
Type |
---|
System.EventHandler<GridUnboundRowEventsArgs> |
Remarks
You can cancel or customize the cell in Unbound rowGridUnboundRowEventsArgs event argument.
See Also
RecordDeleted
Occurs after the record is deleted using Delete key.
Declaration
public event EventHandler<RecordDeletedEventArgs> RecordDeleted
Event Type
Type |
---|
System.EventHandler<RecordDeletedEventArgs> |
Remarks
This event occurs after the RecordDeleting event if that event is not canceled.
See Also
RecordDeleting
Occurs when the record is being deleted using Delete key.
Declaration
public event EventHandler<RecordDeletingEventArgs> RecordDeleting
Event Type
Type |
---|
System.EventHandler<RecordDeletingEventArgs> |
Remarks
You can cancel or customize the record being deleted through the RecordDeletingEventArgs event argument.
See Also
ResizingColumns
Occurs when the column width changes during resizing.
Declaration
public event EventHandler<ResizingColumnsEventArgs> ResizingColumns
Event Type
Type |
---|
System.EventHandler<ResizingColumnsEventArgs> |
Remarks
You can cancel or customize the column being resized through ResizingColumnsEventArgs event argument.
RowDragOver
This event occurs continuously while dragging the record in SfDataGrid.
Declaration
public event EventHandler<DataGridRowDragOverEventArgs> RowDragOver
Event Type
Type |
---|
System.EventHandler<DataGridRowDragOverEventArgs> |
RowDragStarting
This event occurs when a drag-and-drop operation is starting.
Declaration
public event EventHandler<DataGridRowDragStartingEventArgs> RowDragStarting
Event Type
Type |
---|
System.EventHandler<DataGridRowDragStartingEventArgs> |
RowDropped
This event occurs after the record is dropped in the SfDataGrid.
Declaration
public event EventHandler<DataGridRowDroppedEventArgs> RowDropped
Event Type
Type |
---|
System.EventHandler<DataGridRowDroppedEventArgs> |
RowDropping
This event occurs when a record is dropping in SfDataGrid.
Declaration
public event EventHandler<DataGridRowDroppingEventArgs> RowDropping
Event Type
Type |
---|
System.EventHandler<DataGridRowDroppingEventArgs> |
RowValidated
Occurs after the row is validated.
Declaration
public event EventHandler<RowValidatedEventArgs> RowValidated
Event Type
Type |
---|
System.EventHandler<RowValidatedEventArgs> |
Remarks
This event occurs after the RowValidating event if that event is not canceled.
RowValidating
Occurs while the moving from the edited row to validate the user input.
Declaration
public event EventHandler<RowValidatingEventArgs> RowValidating
Event Type
Type |
---|
System.EventHandler<RowValidatingEventArgs> |
Remarks
You can cancel or customize the row is being validated through the RowValidatingEventArgs event argument.
SelectionChanged
Occurs when the current selection changes.
Declaration
public event EventHandler<GridSelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<GridSelectionChangedEventArgs> |
Remarks
This event occurs after the SelectionChanging event if that event is not canceled. It will be raised only for keyboard and mouse interactions.
See Also
SelectionChanging
Occurs when the selection is being changed in SfDataGrid.
Declaration
public event EventHandler<GridSelectionChangingEventArgs> SelectionChanging
Event Type
Type |
---|
System.EventHandler<GridSelectionChangingEventArgs> |
Remarks
You can cancel or customize the selection being changed through the GridSelectionChangingEventArgs event argument.
It will be raised only for keyboard and mouse interactions.
See Also
SortColumnsChanged
Occurs after the column is sorted in SfDataGrid.
Declaration
public event EventHandler<GridSortColumnsChangedEventArgs> SortColumnsChanged
Event Type
Type |
---|
System.EventHandler<GridSortColumnsChangedEventArgs> |
Remarks
This event occurs after the SortColumnsChanging event if that event is not cancelled.
See Also
SortColumnsChanging
Occurs when the column is being sorted in SfDataGrid .
Declaration
public event EventHandler<GridSortColumnsChangingEventArgs> SortColumnsChanging
Event Type
Type |
---|
System.EventHandler<GridSortColumnsChangingEventArgs> |
Remarks
You can cancel or customize the column being sorted using the GridSortColumnsChangingEventArgs event argument. It will be raised for UI based sorting only.