menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeGridCurrentCellManager - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeGridCurrentCellManager

    Represents a class that manages the current cell operation in SfTreeGrid.

    Inheritance
    System.Object
    TreeGridCurrentCellManager
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.TreeGrid
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public class TreeGridCurrentCellManager : Object, IDisposable

    Constructors

    TreeGridCurrentCellManager(SfTreeGrid)

    Initializes a new instance of TreeGridCurrentCellManager class.

    Declaration
    public TreeGridCurrentCellManager(SfTreeGrid treeGrid)
    Parameters
    Type Name Description
    SfTreeGrid treeGrid

    An instance of SfTreeGrid class.

    Properties

    CurrentCell

    Gets or sets the currently active cell.

    Declaration
    public TreeDataColumnBase CurrentCell { get; set; }
    Property Value
    Type Description
    TreeDataColumnBase

    The TreeDataColumnBase that represents the current cell. Returns null if there is no currently active cell.

    CurrentRowColumnIndex

    Gets the current RowColumnIndex of the row or cell that contains the current cell.

    Declaration
    public RowColumnIndex CurrentRowColumnIndex { get; }
    Property Value
    Type
    RowColumnIndex

    HasCurrentCell

    Returns a value that indicates whether the SfTreeGrid contains the currently active cell.

    Declaration
    public bool HasCurrentCell { get; }
    Property Value
    Type
    System.Boolean

    Methods

    BeginEdit()

    Initiates the edit operation on the current cell.

    Declaration
    public bool BeginEdit()
    Returns
    Type Description
    System.Boolean

    Returns true if the current cell entering into edit mode; otherwise, false .

    Dispose()

    Disposes all the resources used by the TreeGridCurrentCellManager class.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposes all the resources used by the TreeGridCurrentCellManager class.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Indicates whether the call is from Dispose method or from a finalizer.

    EndEdit(Boolean)

    Ends the edit operation on the current cell.

    Declaration
    public bool EndEdit(bool canCommit = true)
    Parameters
    Type Name Description
    System.Boolean canCommit

    Specifies whether the value can be committed to the current cell.

    Returns
    Type Description
    System.Boolean

    Returns true if the edit operation is ended; otherwise, false if validation fails, false will be returned.

    GetFirstCellIndex(FlowDirection)

    Gets the index of first focused cell in SfTreeGrid for the specified flow direction.

    Declaration
    protected int GetFirstCellIndex(FlowDirection direction)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.FlowDirection direction

    Contains the direction to get first cell index in SfTreeGrid.

    Returns
    Type Description
    System.Int32

    The first cell index in SfTreeGrid for the specified flow direction.

    GetLastCellIndex(FlowDirection)

    Gets the index of the last focused cell corresponding to the specified direction.

    Declaration
    protected int GetLastCellIndex(FlowDirection direction)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.FlowDirection direction

    The corresponding direction of the cell to get its index.

    Returns
    Type Description
    System.Int32

    Returns the corresponding index of last focused cell.

    GetNextCellIndex(FlowDirection)

    Gets the index of the next focused cell corresponding to the specified direction.

    Declaration
    protected int GetNextCellIndex(FlowDirection flowdirection)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.FlowDirection flowdirection

    The corresponding direction to get the index of next focused cell.

    Returns
    Type Description
    System.Int32

    Returns the index of next focused cell.

    GetPreviousCellIndex(FlowDirection)

    Gets the index of previous cell corresponding to the specified flow direction.

    Declaration
    protected int GetPreviousCellIndex(FlowDirection flowdirection)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.FlowDirection flowdirection

    The corresponding direction to get previous cell index.

    Returns
    Type Description
    System.Int32

    Returns the index of previous cell.

    HandleColumnsCollectionChanged(NotifyCollectionChangedEventArgs)

    Handles the current cell selection when the columns is added or removed at run time.

    Declaration
    protected virtual void HandleColumnsCollectionChanged(NotifyCollectionChangedEventArgs args)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs args

    Contains the data related to the collection changed action in columns collection.

    HandleKeyDown(KeyRoutedEventArgs)

    Handles the selection for the keyboard interactions that are performed current cell.

    Declaration
    public virtual bool HandleKeyDown(KeyRoutedEventArgs args)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.KeyRoutedEventArgs args

    Contains information about the key that was pressed.

    Returns
    Type Description
    System.Boolean

    true if the key should be handled by selection controller; otherwise, false.

    HandlePointerOperation(PointerRoutedEventArgs, RowColumnIndex)

    Handles the current cell selection when any of PointerOperation performed in cell.

    Declaration
    protected virtual bool HandlePointerOperation(PointerRoutedEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.PointerRoutedEventArgs args

    Contains the data related to the mouse action.

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex of the cell.

    Returns
    Type Description
    System.Boolean

    Returns true if the pointer operation should be handled on selection controller; otherwise, false.

    ProcessColumnRemoveAndInsert(TreeGridColumn, Int32, NotifyCollectionChangedAction)

    Processes the current cell when column added or removed at runtime.

    Declaration
    protected void ProcessColumnRemoveAndInsert(TreeGridColumn changedColumn, int changedIndex, NotifyCollectionChangedAction action)
    Parameters
    Type Name Description
    TreeGridColumn changedColumn

    Contains the corresponding changed column.

    System.Int32 changedIndex

    The corresponding index of the column.

    System.Collections.Specialized.NotifyCollectionChangedAction action

    Corresponding collection changed action performed on columns.

    ProcessCurrentCellSelection(RowColumnIndex, ActivationTrigger)

    Method to raise current cell activating event and set current cell, raise current cell activated event.

    Declaration
    protected virtual bool ProcessCurrentCellSelection(RowColumnIndex newRowColumnIndex, ActivationTrigger activationTriggger)
    Parameters
    Type Name Description
    RowColumnIndex newRowColumnIndex

    The corresponding rowcolumnindex to set the current cell.

    ActivationTrigger activationTriggger

    Indicates how the current cell is activated.

    Returns
    Type Description
    System.Boolean

    Returns true if the current cell can be set on particular index; otherwise, false.

    ProcessKeyDown(KeyRoutedEventArgs, RowColumnIndex)

    Handles the selection when the key navigation is processed on the current cell.

    Declaration
    protected virtual bool ProcessKeyDown(KeyRoutedEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.KeyRoutedEventArgs args

    Contains information about the key that was pressed.

    RowColumnIndex rowColumnIndex

    The corresponding row and column index where the key navigation occurs.

    Returns
    Type Description
    System.Boolean

    Returns true if the navigation should be processed by selection controller; otherwise , false.

    Remarks

    Override this method , to customize navigation behavior of current cell in SfTreeGrid.

    ProcessOnDoubleTapped()

    Processes the selection when the mouse point is double tapped on the current cell.

    Declaration
    protected virtual void ProcessOnDoubleTapped()
    Remarks

    This method invoked to begin edit the cell when EditTrigger is OnDoubleTap.

    ProcessOnTapped(TappedRoutedEventArgs, RowColumnIndex)

    Processes the selection when the mouse point is tapped on the current cell.

    Declaration
    protected virtual void ProcessOnTapped(TappedRoutedEventArgs e, RowColumnIndex currentRowColumnIndex)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e

    Contains the data related to the tap interaction.

    RowColumnIndex currentRowColumnIndex

    The corresponding rowColumnIndex of the mouse point.

    Remarks

    This method invoked to begin edit the current cell when EditTrigger is OnTap.

    RemoveCurrentCell(RowColumnIndex)

    Removes the current cell based on the specified row and column index.

    Declaration
    protected void RemoveCurrentCell(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The corresponding rowcolumnindex to remove the current cell.

    Remarks

    This method helps to remove the current cell corresponding to the specified row and column index.

    ScrollInView(RowColumnIndex)

    Scrolls the SfTreeGrid vertically and horizontally to display a cell in view.

    Declaration
    protected void ScrollInView(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Specifies the rowColumnIndex of the cell to bring into view.

    ScrollInViewFromLeft(Int32)

    Scrolls the specified column index in to view from the left direction to the SfTreeGrid.

    Declaration
    public void ScrollInViewFromLeft(int columnIndex)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    The corresponding column index to scroll the column into view.

    Remarks

    This method helps to scroll the column into view when the column is not present in the view area of SfTreeGrid.

    ScrollInViewFromRight(Int32)

    Scrolls the specified column index in to view from the right direction to the SfTreeGrid.

    Declaration
    public void ScrollInViewFromRight(int columnIndex)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    The corresponding column index to scroll the column into view.

    Remarks

    This method helps to scroll the column into view if it is not present in the view area of SfTreeGrid.

    SelectCurrentCell(RowColumnIndex, Boolean)

    Set current cell at the specified row column index.

    Declaration
    protected void SelectCurrentCell(RowColumnIndex rowColumnIndex, bool setFocus = true)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The corresponding rowcolumnindex to set the current cell.

    System.Boolean setFocus

    Decides whether the focus is set to current cell.

    SetCurrentRowColumnIndex(RowColumnIndex)

    Sets the current rowcolumnindex.

    Declaration
    protected void SetCurrentRowColumnIndex(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The rowcolumnindex.

    UpdateGridProperties(RowColumnIndex)

    Set CurrentRowColumnIndex, CurrentItem and RowHeader state.

    Declaration
    protected void UpdateGridProperties(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    rowColumnIndex for setting current row index.

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved