alexa
menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class TreeGridCellSelectionController

    Represents a class that implements the selection behavior of cell in SfTreeGrid.

    Inheritance
    System.Object
    TreeGridBaseSelectionController
    TreeGridCellSelectionController
    Implements
    ITreeGridSelectionController
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    TreeGridBaseSelectionController.ChangeFlowDirectionKey(Key)
    TreeGridBaseSelectionController.CreateCurrentCellManager()
    TreeGridBaseSelectionController.CurrentCellManager
    TreeGridBaseSelectionController.Dispose()
    TreeGridBaseSelectionController.HandleGridOperations(TreeGridOperationsHandlerArgs)
    TreeGridBaseSelectionController.HandlePointerOperations(GridPointerEventArgs, RowColumnIndex)
    TreeGridBaseSelectionController.HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs)
    TreeGridBaseSelectionController.IsSuspended
    TreeGridBaseSelectionController.LastPressedKey
    TreeGridBaseSelectionController.OnAutoScrollerValueChanged(Object, AutoScrollerValueChangedEventArgs)
    TreeGridBaseSelectionController.PressedRowColumnIndex
    TreeGridBaseSelectionController.ProcessNavigationModeChanged(SelectionPropertyChangedHandlerArgs)
    TreeGridBaseSelectionController.RaiseSelectionChanged(List<Object>, List<Object>)
    TreeGridBaseSelectionController.RaiseSelectionChanging(List<Object>, List<Object>)
    TreeGridBaseSelectionController.ResumeUpdates()
    TreeGridBaseSelectionController.ScrollToRowIndex(Int32)
    TreeGridBaseSelectionController.SelectedRows
    TreeGridBaseSelectionController.SetPressedIndex(RowColumnIndex)
    TreeGridBaseSelectionController.SuspendUpdates()
    TreeGridBaseSelectionController.TreeGrid
    TreeGridBaseSelectionController.UnWireEvents()
    Namespace: Syncfusion.UI.Xaml.TreeGrid
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class TreeGridCellSelectionController : TreeGridBaseSelectionController, ITreeGridSelectionController, IDisposable

    Constructors

    TreeGridCellSelectionController(SfTreeGrid)

    Initializes a new instance of TreeGridCellSelectionController class.

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

    The SfTreeGrid .

    Methods

    ClearSelections(Boolean)

    Declaration
    public override void ClearSelections(bool exceptCurrentCell)
    Parameters
    Type Name Description
    System.Boolean exceptCurrentCell
    Overrides
    TreeGridBaseSelectionController.ClearSelections(Boolean)

    Dispose(Boolean)

    Release all the resources used by the TreeGridCellSelectionController class.

    Declaration
    protected override void Dispose(bool isDisposing)
    Parameters
    Type Name Description
    System.Boolean isDisposing

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

    Overrides
    TreeGridBaseSelectionController.Dispose(Boolean)

    GetNextCellIndex(Int32)

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

    Declaration
    protected virtual int GetNextCellIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The corresponding index to get the index of next cell.

    Returns
    Type Description
    System.Int32

    Returns the index of next cell.

    GetNextRowIndex(Int32)

    Gets the index of next row corresponding to the specified index.

    Declaration
    protected virtual int GetNextRowIndex(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The corresponding index to get the index of next row.

    Returns
    Type Description
    System.Int32

    Returns the index of next row.

    GetPreviousCellIndex(Int32)

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

    Declaration
    protected virtual int GetPreviousCellIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The corresponding index to get the previous cell index.

    Returns
    Type Description
    System.Int32

    Returns the index of previous cell.

    GetPreviousRowIndex(Int32)

    Gets the index of previous row corresponding to the specified index.

    Declaration
    protected virtual int GetPreviousRowIndex(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The corresponding index to get the index of previous row.

    Returns
    Type Description
    System.Int32

    Returns the index of previous row.

    HandleCollectionChanged(NotifyCollectionChangedEventArgs, TreeGridCollectionChangedReason)

    Handles the cell selection when the SelectedItems, Columns and DataSource collection changes.

    Declaration
    public override void HandleCollectionChanged(NotifyCollectionChangedEventArgs e, TreeGridCollectionChangedReason reason)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains data for collection changes.

    TreeGridCollectionChangedReason reason

    Contains the corresponding for collection changes.

    Overrides
    TreeGridBaseSelectionController.HandleCollectionChanged(NotifyCollectionChangedEventArgs, TreeGridCollectionChangedReason)
    Remarks

    This method is not applicable when the SelectionUnit and NavigationMode is Row.

    HandleKeyDown(KeyEventArgs)

    Handles the cell selection when the keyboard interactions are performed in SfTreeGrid.

    Declaration
    public override bool HandleKeyDown(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs args

    Contains information about the key that was pressed.

    Returns
    Type Description
    System.Boolean

    true if the key should be handled in SfTreeGrid; otherwise, false.

    Overrides
    TreeGridBaseSelectionController.HandleKeyDown(KeyEventArgs)

    HandleNodeExpandCollapse(Int32, Int32, Boolean)

    Handles the cell selection when the node is expanded or collapsed in SfTreeGrid.

    Declaration
    public override void HandleNodeExpandCollapse(int index, int itemsCount, bool isExpanded)
    Parameters
    Type Name Description
    System.Int32 index

    The corresponding index of the node.

    System.Int32 itemsCount

    The number of rows that are collapsed or expanded.

    System.Boolean isExpanded

    Decides whether the node is expanded or not.

    Overrides
    TreeGridBaseSelectionController.HandleNodeExpandCollapse(Int32, Int32, Boolean)
    Remarks

    This method is invoked when the node is expanded or collapsed.

    HandleNodeOperations(NodeOperation)

    Processes the selection when the node is expanded/collapsed in SfTreeGrid.

    Declaration
    protected override void HandleNodeOperations(NodeOperation NodeOperation)
    Parameters
    Type Name Description
    NodeOperation NodeOperation

    Contains the value for collection changes during expanding/collapsing action.

    Overrides
    TreeGridBaseSelectionController.HandleNodeOperations(NodeOperation)
    Remarks

    This method refreshes the selection while expanding/collapsing the node in SfTreeGrid.

    MoveCurrentCell(RowColumnIndex, Boolean)

    Moves the current cell for the specified rowColumnIndex.

    Declaration
    public override 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

    Decides whether the current cell selection is cleared while moving the current cell.

    Overrides
    TreeGridBaseSelectionController.MoveCurrentCell(RowColumnIndex, Boolean)
    Remarks

    This method is not applicable when the SelectionUnit and NavigationMode is Row.

    OnColumnRemoved(TreeGridColumn)

    Processes the selection when the column is removed from the selected cells in SfTreeGrid.

    Declaration
    protected virtual void OnColumnRemoved(TreeGridColumn column)
    Parameters
    Type Name Description
    TreeGridColumn column

    The corresponding column that is removed from the selected cells.

    OnKeyDown(KeyEventArgs)

    Processes the cell selection when the keyboard interactions that are performed in SfTreeGrid.

    Declaration
    protected virtual void OnKeyDown(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs args

    Contains the information about the key that was pressed.

    Remarks

    This method helps to customize the keyboard interaction behavior in SfTreeGrid.

    OnSourceCollectionChanged(NotifyCollectionChangedEventArgs, TreeGridCollectionChangedReason)

    Processes the cell selection when the ItemsSource property value changes.

    Declaration
    protected virtual void OnSourceCollectionChanged(NotifyCollectionChangedEventArgs e, TreeGridCollectionChangedReason reason)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains data for source collection changes.

    TreeGridCollectionChangedReason reason

    The TreeGridCollectionChangedReason contains reason for the source collection changes.

    ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs)

    Processes the cell selection when the CurrentItem property value changes.

    Declaration
    protected override void ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs handle)
    Parameters
    Type Name Description
    SelectionPropertyChangedHandlerArgs handle

    The SelectionPropertyChangedHandlerArgs contains the data for the CurrentItem property value changes.

    Overrides
    TreeGridBaseSelectionController.ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs)

    ProcessDataReorder(Object, NotifyCollectionChangedAction)

    Processes the cell selection when the data is reordered in SfTreeGrid.

    Declaration
    protected virtual void ProcessDataReorder(object value, NotifyCollectionChangedAction action)
    Parameters
    Type Name Description
    System.Object value

    The corresponding value to check whether the reordered data that contains cell selection.

    System.Collections.Specialized.NotifyCollectionChangedAction action

    Indicates the corresponding collection changed actions performed on the data.

    ProcessDragSelection(MouseEventArgs, RowColumnIndex)

    Processes the cell selection when the mouse pointer is dragged on the SfTreeGrid.

    Declaration
    protected override void ProcessDragSelection(MouseEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs args

    Contains the data related to the mouse action.

    RowColumnIndex rowColumnIndex

    The starting rowColumnIndex of the drag selection.

    Overrides
    TreeGridBaseSelectionController.ProcessDragSelection(MouseEventArgs, RowColumnIndex)
    Remarks

    This method will be raised when the SelectionMode is Multiple or Extended.

    ProcessOnDoubleTapped(RowColumnIndex)

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

    Declaration
    protected override void ProcessOnDoubleTapped(RowColumnIndex currentRowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex currentRowColumnIndex

    The corresponding rowColumnIndex of the mouse point.

    Overrides
    TreeGridBaseSelectionController.ProcessOnDoubleTapped(RowColumnIndex)
    Remarks

    This method invoked to process selection and end edit the cell when EditTrigger is OnDoubleTap.

    ProcessOnFilterApplied(GridFilteringEventArgs)

    Processes the cell selection when filtering is applied in SfTreeGrid.

    Declaration
    protected override void ProcessOnFilterApplied(GridFilteringEventArgs args)
    Parameters
    Type Name Description
    GridFilteringEventArgs args

    Contains the data related to filtering operation.

    Overrides
    TreeGridBaseSelectionController.ProcessOnFilterApplied(GridFilteringEventArgs)

    ProcessOnFilterPopupOpened()

    Processes the cell selection when the filter popup is opened.

    Declaration
    protected override void ProcessOnFilterPopupOpened()
    Overrides
    TreeGridBaseSelectionController.ProcessOnFilterPopupOpened()
    Remarks

    This method refreshes the cell selection while opening the filter popup in SfTreeGrid.

    ProcessOnRowHeaderChanged()

    Processes the cell selection when the ShowRowHeader property value changes.

    Declaration
    protected override void ProcessOnRowHeaderChanged()
    Overrides
    TreeGridBaseSelectionController.ProcessOnRowHeaderChanged()

    ProcessOnSortChanged(SortColumnChangedHandle)

    Processes the cell selection when the column is sorted in SfTreeGrid.

    Declaration
    protected override void ProcessOnSortChanged(SortColumnChangedHandle sortColumnHandle)
    Parameters
    Type Name Description
    SortColumnChangedHandle sortColumnHandle

    Contains information related to the sorting action.

    Overrides
    TreeGridBaseSelectionController.ProcessOnSortChanged(SortColumnChangedHandle)
    Remarks

    This method refreshes the selection while sorting the column in SfTreeGrid.

    ProcessOnStackedHeaderRows(StackedHeaderCollectionChangedEventArgs)

    Processes the cell selection when the stacked header collection changes in SfTreeGrid.

    Declaration
    protected override void ProcessOnStackedHeaderRows(StackedHeaderCollectionChangedEventArgs args)
    Parameters
    Type Name Description
    StackedHeaderCollectionChangedEventArgs args

    Contains data for stacked header collection changes.

    Overrides
    TreeGridBaseSelectionController.ProcessOnStackedHeaderRows(StackedHeaderCollectionChangedEventArgs)

    ProcessOnTapped(MouseButtonEventArgs, RowColumnIndex)

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

    Declaration
    protected override void ProcessOnTapped(MouseButtonEventArgs e, RowColumnIndex currentRowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    Contains the data related to the tap interaction.

    RowColumnIndex currentRowColumnIndex

    The corresponding rowColumnIndex of the mouse point.

    Overrides
    TreeGridBaseSelectionController.ProcessOnTapped(MouseButtonEventArgs, RowColumnIndex)
    Remarks

    This method invoked to process selection and end edit the cell when EditTrigger is OnTap.

    ProcessPointerMoved(MouseEventArgs, RowColumnIndex)

    Processes the cell selection when mouse pointer moved on the SfTreeGrid.

    Declaration
    protected override void ProcessPointerMoved(MouseEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs args

    Contains the data related to the mouse move action.

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex related to the mouse point.

    Overrides
    TreeGridBaseSelectionController.ProcessPointerMoved(MouseEventArgs, RowColumnIndex)

    ProcessPointerPressed(MouseButtonEventArgs, RowColumnIndex)

    Processes the cell selection when the mouse pointer is pressed in SfTreeGrid.

    Declaration
    protected override void ProcessPointerPressed(MouseButtonEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs args

    Contains the data for mouse pointer action.

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex of the pressed point location.

    Overrides
    TreeGridBaseSelectionController.ProcessPointerPressed(MouseButtonEventArgs, RowColumnIndex)
    Remarks

    This method will be invoked when the pointer is pressed using touch or mouse in SfTreeGrid. The selection is initialized in pointer pressed state when the AllowSelectionOnPointerPressed set as true.

    ProcessPointerReleased(MouseButtonEventArgs, RowColumnIndex)

    Processes the cell selection when the mouse pointer is released in SfTreeGrid.

    Declaration
    protected override void ProcessPointerReleased(MouseButtonEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs args

    Contains the data for mouse pointer action.

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex of mouse released point.

    Overrides
    TreeGridBaseSelectionController.ProcessPointerReleased(MouseButtonEventArgs, RowColumnIndex)
    Remarks

    The selection is initialized in pointer released state when the AllowSelectionOnPointerPressed set as false.

    ProcessPointerWheel(MouseWheelEventArgs, RowColumnIndex)

    Processes the cell selection while scrolling the SfTreeGrid using mouse wheel.

    Declaration
    protected override void ProcessPointerWheel(MouseWheelEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    System.Windows.Input.MouseWheelEventArgs args

    An System.Windows.Input.MouseButtonEventArgsthat contains the event data

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex where the mouse wheel interaction occurs.

    Overrides
    TreeGridBaseSelectionController.ProcessPointerWheel(MouseWheelEventArgs, RowColumnIndex)

    ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs)

    Processes the cell selection when the SelectedIndex property value changes.

    Declaration
    protected override void ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs handle)
    Parameters
    Type Name Description
    SelectionPropertyChangedHandlerArgs handle

    The SelectionPropertyChangedHandlerArgs contains the data for the SelectedIndex property value changes.

    Overrides
    TreeGridBaseSelectionController.ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs)

    ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs)

    Processes the cell selection when the SelectedItem property value changes.

    Declaration
    protected override void ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs handle)
    Parameters
    Type Name Description
    SelectionPropertyChangedHandlerArgs handle

    The SelectionPropertyChangedHandlerArgs that contains the data for the SelectedItem property value changes.

    Overrides
    TreeGridBaseSelectionController.ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs)

    ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs)

    Processes the cell selection when the SelectionMode property value changes.

    Declaration
    protected override void ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs handle)
    Parameters
    Type Name Description
    SelectionPropertyChangedHandlerArgs handle

    The SelectionPropertyChangedHandlerArgs contains the data for the SelectionMode property value changes.

    Overrides
    TreeGridBaseSelectionController.ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs)

    ResetSelectedCells(Boolean)

    Updates the SelectedCells based on row data and removes the cells from the SelectedCells collection that is not in currently in view.

    Declaration
    public void ResetSelectedCells(bool canUpdateCurrentCell = true)
    Parameters
    Type Name Description
    System.Boolean canUpdateCurrentCell

    true, if the current cell is need to be updated during reset the SelectedCells.

    Remarks

    The SelectedCells collection updated only for record cells and other selection will be removed.

    SelectAll()

    Selects all the cells in SfTreeGrid.

    Declaration
    public override void SelectAll()
    Overrides
    TreeGridBaseSelectionController.SelectAll()
    Remarks

    This method only works for Multiple and Extended mode selection.

    SelectRows(Int32, Int32)

    Selects the rows corresponding to the specified start and end index of the row.

    Declaration
    public override void SelectRows(int startRowIndex, int endRowIndex)
    Parameters
    Type Name Description
    System.Int32 startRowIndex

    The start index of the row.

    System.Int32 endRowIndex

    The end index of the row.

    Overrides
    TreeGridBaseSelectionController.SelectRows(Int32, Int32)

    Implements

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