Class GridHeaderCellControl
Represents a class that provides common functionalities of HeaderCellControl in SfDataGrid.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.DataGrid
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class GridHeaderCellControl : ContentControl, IDisposableConstructors
GridHeaderCellControl()
Initializes a new instance of GridHeaderIndentCell class.
Declaration
public GridHeaderCellControl()Fields
ColumnProperty
Dependency registration for Column property.
Declaration
public static readonly DependencyProperty ColumnPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
FilterIconVisibilityProperty
Dependency property registration for FilterIconVisibility.
Declaration
public static readonly DependencyProperty FilterIconVisibilityPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
SortDirectionProperty
Dependency registration for SortDirection property.
Declaration
public static readonly DependencyProperty SortDirectionPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
SortNumberProperty
Dependeny registration for SortNumber property.
Declaration
public static readonly DependencyProperty SortNumberPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
SortNumberVisibilityProperty
Dependency registration for SortNumberVisibility property.
Declaration
public static readonly DependencyProperty SortNumberVisibilityPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
Properties
Column
Gets or sets Associated GridColumn.
Declaration
public GridColumn Column { get; set; }Property Value
| Type | 
|---|
| GridColumn | 
Remarks
Using this Column all other operations will be done
FilterIconVisibility
Gets or sets the visibility for FilterIcon.
Declaration
public Visibility FilterIconVisibility { get; set; }Property Value
| Type | 
|---|
| Microsoft.UI.Xaml.Visibility | 
GridCellRegion
Gets or sets the cell region in the SfTreeGrid.
Declaration
public GridCellRegion GridCellRegion { get; set; }Property Value
| Type | 
|---|
| GridCellRegion | 
IsFilterApplied
Gets a value indicating whether the filter s applied .
Declaration
protected bool IsFilterApplied { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | true if this instance ; otherwise, false. | 
SortDirection
Gets or sets Path direction (Ascending/Descending).
Declaration
public object SortDirection { get; set; }Property Value
| Type | 
|---|
| System.Object | 
SortNumber
Gets or sets Order/Number for sort columns.
Declaration
public string SortNumber { get; }Property Value
| Type | 
|---|
| System.String | 
SortNumberVisibility
Gets or sets Sorting Number visibility.
Declaration
public Visibility SortNumberVisibility { get; set; }Property Value
| Type | 
|---|
| Microsoft.UI.Xaml.Visibility | 
Methods
ApplyFilterToggleButtonVisualState()
Sets the VisualState for the Filter toggle button.
Declaration
protected virtual void ApplyFilterToggleButtonVisualState()Dispose()
Disposes all the resources GridHeaderCellControl class.
Declaration
public void Dispose()Dispose(Boolean)
Disposes all the resources GridHeaderCellControl class.
Declaration
protected virtual void Dispose(bool isDisposing)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. | 
OnApplyTemplate()
Invoked to apply template for GridHeaderCellControl
Declaration
protected override void OnApplyTemplate()OnColumnChanged()
Invoked when column changed.
Declaration
protected virtual void OnColumnChanged()OnCreateAutomationPeer()
Returns a class-specific AutomationPeer Implementations for the Microsoft UI Automation infrastrcutre.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()Returns
| Type | Description | 
|---|---|
| Microsoft.UI.Xaml.Automation.Peers.AutomationPeer | The class-specific AutomationPeer subclass. | 
OnDoubleTapped(DoubleTappedRoutedEventArgs)
Called before the Double tapped event occurs.
Declaration
protected override void OnDoubleTapped(DoubleTappedRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.DoubleTappedRoutedEventArgs | e | 
OnHolding(HoldingRoutedEventArgs)
Called before the Holding event occurs.
Declaration
protected override void OnHolding(HoldingRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.HoldingRoutedEventArgs | e | 
OnManipulationStarted(ManipulationStartedRoutedEventArgs)
Called before the Manipulation Started event occurs.
Declaration
protected override void OnManipulationStarted(ManipulationStartedRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.ManipulationStartedRoutedEventArgs | e | 
OnManipulationStarting(ManipulationStartingRoutedEventArgs)
Called before the Manipulation Starting event occurs.
Declaration
protected override void OnManipulationStarting(ManipulationStartingRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.ManipulationStartingRoutedEventArgs | e | 
OnPointerCaptureLost(PointerRoutedEventArgs)
Called before the PointerCaptureLost event occurs.
Declaration
protected override void OnPointerCaptureLost(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnPointerEntered(PointerRoutedEventArgs)
Called before the pointer entered occurs.
Declaration
protected override void OnPointerEntered(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnPointerExited(PointerRoutedEventArgs)
Called before the PointerExited event occurs.
Declaration
protected override void OnPointerExited(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnPointerMoved(PointerRoutedEventArgs)
Called before the PointerMoved event occurs.
Declaration
protected override void OnPointerMoved(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnPointerPressed(PointerRoutedEventArgs)
Called before the PointerPressed event occurs.
Declaration
protected override void OnPointerPressed(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnPointerReleased(PointerRoutedEventArgs)
Called before the PointerReleased event occurs.
Declaration
protected override void OnPointerReleased(PointerRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | 
OnRightTapped(RightTappedRoutedEventArgs)
When Right click the SfDataGrid Cell, Context menu appears for the selected cell. we are using this event for context menu support in Header cell.
Declaration
protected override void OnRightTapped(RightTappedRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.RightTappedRoutedEventArgs | e | Right tapped event arguments | 
OnSortDirectionChanged(DependencyPropertyChangedEventArgs)
Invoked when SortDirection changed.
Declaration
protected virtual void OnSortDirectionChanged(DependencyPropertyChangedEventArgs args)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.DependencyPropertyChangedEventArgs | args | 
OnTapped(TappedRoutedEventArgs)
Called before the Tapped event occurs.
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)Parameters
| Type | Name | Description | 
|---|---|---|
| Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e | 
OpenFilterPopUp()
Invoked to open the Filter popup.
Declaration
protected virtual void OpenFilterPopUp()ShowContextFlyout(Point)
Opens the context flyout at the specified position.
Declaration
protected virtual bool ShowContextFlyout(Point position)Parameters
| Type | Name | Description | 
|---|---|---|
| Windows.Foundation.Point | position | The position to display context flyout. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | true If the context flyout opened;Otherwisefalse | 
Update()
Makes Sure headercell property for updation
Declaration
public void Update()Remarks
initial sort itemsource change checking
UpdateGridHeaderCellBorderState(Boolean)
Update the VisualState based upon the cell region.
Declaration
public void UpdateGridHeaderCellBorderState(bool canApplyDefaultState = true)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | canApplyDefaultState |