menu

WinUI

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

    Show / Hide Table of Contents

    Class SfTreeGrid

    Represents a control that displays the data in a tree format.

    Inheritance
    System.Object
    SfGridBase
    SfTreeGrid
    Implements
    System.IDisposable
    Inherited Members
    SfGridBase.AllowDraggingColumns
    SfGridBase.AllowDraggingColumnsProperty
    SfGridBase.AllowEditing
    SfGridBase.AllowEditingProperty
    SfGridBase.AllowResizingColumns
    SfGridBase.AllowResizingColumnsProperty
    SfGridBase.AllowResizingHiddenColumns
    SfGridBase.AllowResizingHiddenColumnsProperty
    SfGridBase.AllowRowDragDrop
    SfGridBase.AllowRowDragDropProperty
    SfGridBase.AllowSelectionOnPointerPressed
    SfGridBase.AllowSelectionOnPointerPressedProperty
    SfGridBase.AllowSorting
    SfGridBase.AllowSortingProperty
    SfGridBase.AllowTriStateSorting
    SfGridBase.AllowTriStateSortingProperty
    SfGridBase.AutoGenerateColumns
    SfGridBase.AutoGenerateColumnsForCustomType
    SfGridBase.AutoGenerateColumnsForCustomTypeProperty
    SfGridBase.AutoGenerateColumnsMode
    SfGridBase.AutoGenerateColumnsModeForCustomType
    SfGridBase.AutoGenerateColumnsModeForCustomTypeProperty
    SfGridBase.AutoGenerateColumnsModeProperty
    SfGridBase.AutoGenerateColumnsProperty
    SfGridBase.CellTemplateSelector
    SfGridBase.CellTemplateSelectorProperty
    SfGridBase.CopyOption
    SfGridBase.CopyOptionProperty
    SfGridBase.CreateColumn(PropertyInfo, DisplayAttribute, Boolean)
    SfGridBase.CurrentCellBorderBrush
    SfGridBase.CurrentCellBorderBrushProperty
    SfGridBase.CurrentCellBorderThickness
    SfGridBase.CurrentCellBorderThicknessProperty
    SfGridBase.DataValidationMode
    SfGridBase.DataValidationModeProperty
    SfGridBase.Dispose()
    SfGridBase.EditorSelectionBehavior
    SfGridBase.EditorSelectionBehaviorProperty
    SfGridBase.EditTrigger
    SfGridBase.EditTriggerProperty
    SfGridBase.FrozenColumnsCount
    SfGridBase.FrozenColumnsCountProperty
    SfGridBase.FrozenFooterColumnsCount
    SfGridBase.FrozenFooterColumnsCountProperty
    SfGridBase.GridLinesVisibility
    SfGridBase.GridLinesVisibilityProperty
    SfGridBase.HeaderContextFlyout
    SfGridBase.HeaderContextFlyoutProperty
    SfGridBase.HeaderLinesVisibility
    SfGridBase.HeaderLinesVisibilityProperty
    SfGridBase.HeaderRowHeight
    SfGridBase.HeaderRowHeightProperty
    SfGridBase.IsReadOnly
    SfGridBase.IsReadOnlyProperty
    SfGridBase.NavigationMode
    SfGridBase.NavigationModeProperty
    SfGridBase.PasteOption
    SfGridBase.PasteOptionProperty
    SfGridBase.RecordContextFlyout
    SfGridBase.RecordContextFlyoutProperty
    SfGridBase.RowHeaderWidth
    SfGridBase.RowHeaderWidthProperty
    SfGridBase.RowHeight
    SfGridBase.RowHeightProperty
    SfGridBase.SelectedIndex
    SfGridBase.SelectedIndexProperty
    SfGridBase.SelectedItem
    SfGridBase.SelectedItemProperty
    SfGridBase.SelectedItems
    SfGridBase.SelectedItemsProperty
    SfGridBase.SelectionMode
    SfGridBase.SelectionModeProperty
    SfGridBase.ShowRowHeader
    SfGridBase.ShowRowHeaderProperty
    SfGridBase.ShowSortNumbers
    SfGridBase.ShowSortNumbersProperty
    SfGridBase.ShowToolTip
    SfGridBase.ShowToolTipProperty
    SfGridBase.SortClickAction
    SfGridBase.SortClickActionProperty
    SfGridBase.SortColumnDescriptions
    SfGridBase.SortColumnDescriptionsProperty
    SfGridBase.StackedHeaderRows
    SfGridBase.StackedHeaderRowsProperty
    Namespace: Syncfusion.UI.Xaml.TreeGrid
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public class SfTreeGrid : SfGridBase, IDisposable
    Remarks

    The SfTreeGrid control provides a flexible way to display and manipulate self-relational and hierarchical data and the built-in column types allows the data to be displayed in to appropriate editor.

    Constructors

    SfTreeGrid()

    Initialize a new instance of the SfTreeGrid class.

    Declaration
    public SfTreeGrid()

    Fields

    AllowAutoSizingExpanderColumnProperty

    Identifies the AllowAutoSizingExpanderColumn dependency property.

    Declaration
    public static readonly DependencyProperty AllowAutoSizingExpanderColumnProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowAutoSizingExpanderColumn 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.

    AllowSelectionOnExpanderClickProperty

    Identifies the AllowSelectionOnExpanderClick dependency property.

    Declaration
    public static readonly DependencyProperty AllowSelectionOnExpanderClickProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowSelectionOnExpanderClick dependency property.

    AllowTriStateCheckingProperty

    Identifies the AllowTriStateChecking dependency property.

    Declaration
    public static readonly DependencyProperty AllowTriStateCheckingProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowTriStateChecking dependency property.

    AutoExpandModeProperty

    Identifies the AutoExpandMode dependency property.

    Declaration
    public static readonly DependencyProperty AutoExpandModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AutoExpandMode 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.

    CheckBoxMappingNameProperty

    Identifies the CheckBoxMappingName dependency property.

    Declaration
    public static readonly DependencyProperty CheckBoxMappingNameProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the CheckBoxMappingName dependency property.

    CheckBoxSelectionModeProperty

    Identifies the CheckBoxSelectionMode dependency property.

    Declaration
    public static readonly DependencyProperty CheckBoxSelectionModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the CheckBoxSelectionMode dependency property.

    ChildPropertyNameProperty

    Identifies the ChildPropertyName dependency property.

    Declaration
    public static readonly DependencyProperty ChildPropertyNameProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ChildPropertyName 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.

    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.

    EnableRecursiveCheckingProperty

    Identifies the EnableRecursiveChecking dependency property.

    Declaration
    public static readonly DependencyProperty EnableRecursiveCheckingProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the EnableRecursiveChecking dependency property.

    ExpanderCellStyleProperty

    Identifies the ExpanderCellStyle dependency property.

    Declaration
    public static readonly DependencyProperty ExpanderCellStyleProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ExpanderCellStyle dependency property.

    ExpanderCellStyleSelectorProperty

    Identifies the ExpanderCellStyleSelector dependency property.

    Declaration
    public static readonly DependencyProperty ExpanderCellStyleSelectorProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ExpanderCellStyleSelector dependency property.

    ExpanderColumnProperty

    Identifies the ExpanderColumn dependency property.

    Declaration
    public static readonly DependencyProperty ExpanderColumnProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ExpanderColumn dependency property.

    ExpanderContextFlyoutProperty

    Identifies the ExpanderContextFlyout dependency property.

    Declaration
    public static readonly DependencyProperty ExpanderContextFlyoutProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ExpanderContextFlyout dependency property.

    ExpandStateMappingNameProperty

    Identifies the ExpandStateMappingName dependency property.

    Declaration
    public static readonly DependencyProperty ExpandStateMappingNameProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for ExpandStateMappingName dependency property.

    FilterLevelProperty

    Identifies the FilterLevel dependency property.

    Declaration
    public static readonly DependencyProperty FilterLevelProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterLevel 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.

    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.

    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.

    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.

    LiveNodeUpdateModeProperty

    Identifies the LiveNodeUpdateMode dependency property.

    Declaration
    public static readonly DependencyProperty LiveNodeUpdateModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the LiveNodeUpdateMode dependency property.

    LoadOnDemandCommandProperty

    Identifies the LoadOnDemandCommand bindable property.

    Declaration
    public static readonly DependencyProperty LoadOnDemandCommandProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    This bindable property is read-only.

    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.

    ParentPropertyNameProperty

    Identifies the ParentPropertyName dependency property.

    Declaration
    public static readonly DependencyProperty ParentPropertyNameProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ParentPropertyName dependency property.

    RecursiveCheckingModeProperty

    Identifies the RecursiveCheckingMode dependency property.

    Declaration
    public static readonly DependencyProperty RecursiveCheckingModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the RecursiveCheckingMode dependency property.

    RowIndentModeProperty

    Identifies the RowIndentMode dependency property.

    Declaration
    public static readonly DependencyProperty RowIndentModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the RowIndentMode 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.

    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.

    SelfRelationRootValueProperty

    Identifies the SelfRelationRootValue dependency property.

    Declaration
    public static readonly DependencyProperty SelfRelationRootValueProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the SelfRelationRootValue dependency property.

    SelfRelationUpdateModeProperty

    Identifies the SelfRelationUpdateMode dependency property.

    Declaration
    public static readonly DependencyProperty SelfRelationUpdateModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the SelfRelationUpdateMode dependency property.

    ShowCheckBoxProperty

    Identifies the ShowCheckBox dependency property.

    Declaration
    public static readonly DependencyProperty ShowCheckBoxProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ShowCheckBox 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.

    Properties

    AllowAutoSizingExpanderColumn

    Gets or sets whether to change the width of expander column while expanding or collapsing based on maximum no of levels expanded.

    Declaration
    public bool AllowAutoSizingExpanderColumn { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the AllowAutoSizingExpanderColumn is enabled in SfDataGrid AllowFiltering; otherwise, false. The default value is false.

    AllowFiltering

    Gets or sets a value that indicates whether UI filtering is enabled in SfTreeGrid.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if UI filtering is enabled; 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
    AllowFiltering
    ColumnFilter
    FilterBehavior
    FilteredFrom
    FilterPredicates
    FilterItemsPopulating
    FilterItemsPopulated
    FilterPopupTemplate
    FilterPopupStyle
    TreeGridCheckBoxFilterControl
    TreeGridAdvancedFilterControl
    TreeGridFilterControl

    AllowSelectionOnExpanderClick

    Gets or sets a value which specifies whether selection should be added while clicking expander for expanding/collapsing the nodes.

    Declaration
    public bool AllowSelectionOnExpanderClick { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the row or cell can be selected with Expanderclick; otherwise, false. The default value is True.

    AllowTriStateChecking

    Gets or sets a value which specifies IsThreeState property value of Node CheckBox.

    Declaration
    public bool AllowTriStateChecking { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the Tristatechecking as enabled; otherwise, false. The default value is false.

    Remarks

    Node check can be displayed in expander by setting ShowCheckBox

    AutoExpandMode

    Gets or sets the value which indicates how the nodes to be expanded while loading.

    Declaration
    public AutoExpandMode AutoExpandMode { get; set; }
    Property Value
    Type Description
    AutoExpandMode

    The default value is None.

    AutoScroller

    Gets or sets an instance of the TreeGridAutoScroller to perform horizontal or vertical scrolling automatically, when the row/column is dragged outside of the visible boundaries in SfTreeGrid.

    Declaration
    public TreeGridAutoScroller AutoScroller { get; set; }
    Property Value
    Type Description
    TreeGridAutoScroller

    An instance of the TreeGridAutoScroller.

    CellRenderers

    Gets the reference to the TreeGridCellRendererCollection instance which holds the collection of all predefined cell renderers TreeGridVirtualizingCellRenderer<D, E>.

    Declaration
    public TreeGridCellRendererCollection CellRenderers { get; }
    Property Value
    Type Description
    TreeGridCellRendererCollection

    An instance of the TreeGridCellRendererCollection.

    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  ClassCell TypeAssociated column
    TreeGridCellTextBoxRendererTextBoxTreeGridTextColumn
    TreeGridCellNumericRendererNumericTreeGridNumericColumn
    TreeGridCellCheckBoxRendererCheckBoxTreeGridCheckBoxColumn
    TreeGridCellTemplateRendererTemplateTreeGridTemplateColumn
    TreeGridCellComboBoxRendererComboBoxTreeGridComboBoxColumn
    TreeGridCellDateTimeRendererDateTimeTreeGridDateTimeColumn
    TreeGridCellHyperLinkRendererHyperLinkTreeGridHyperLinkColumn
    TreeGridHeaderCellRendererHeader-
    TreeGridCellTextBlockRendererTextBlock-
    TreeGridRowHeaderCellRendererRowHeader-
    Examples
    //The customized TreeGridCellTextBoxRendererExt is replaced to CellRenderers collection after removed the default renderer of TreeGridTextColumn.
    this.treeGrid.CellRenderers.Remove("TextBox");
    this.treeGrid.CellRenderers.Add("TextBox",new TreeGridCellTextBoxRendererExt());

    CellStyle

    Gets or sets the style applied to all the record cells in SfTreeGrid.

    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 SfTreeGrid. The default value is null.

    Remarks

    To define a Microsoft.UI.Xaml.Style for a cell, specify a TargetType of TreeGridCell.

    Examples
    <Page.Resources>
        <Style x:Key="cellstyle" TargetType="treeGrid:TreeGridCell">
            <Setter Property="Background" Value="Bisque"/>
        </Style>
    </Page.Resources>
    <treeGrid:SfTreeGrid  x:Name="sfTreeGrid"                   
                          CellStyle="{StaticResource cellstyle}"
                          AutoExpandMode="RootNodesExpanded"
                          AutoGenerateColumns="True"
                          ChildPropertyName="Children"
                          ExpanderColumn="FirstName"
                          ItemsSource="{Binding Persons}">
    </treeGrid:SfTreeGrid>

    CellStyleSelector

    Gets or sets the style applied to record cells conditionally based on data in SfTreeGrid.

    Declaration
    public StyleSelector CellStyleSelector { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Controls.StyleSelector

    A StyleSelector object that chooses the style to cell based on data. The default value is null.

    Remarks

    To define a Style for a cell, specify a TargetType of TreeGridCell.

    See Also
    CellStyle

    CheckBoxMappingName

    Gets or sets the name of a property in data object associated with node check box.

    Declaration
    public string CheckBoxMappingName { get; set; }
    Property Value
    Type Description
    System.String

    The CheckBox mapping name.

    See Also
    ShowCheckBox

    CheckBoxSelectionMode

    Gets or sets a value that specifies how selection should be processed when node CheckBox is checked or unchecked.

    Declaration
    public CheckBoxSelectionMode CheckBoxSelectionMode { get; set; }
    Property Value
    Type Description
    CheckBoxSelectionMode

    One of the CheckBoxSelectionMode enumeration which specify how selection should be processed when node CheckBox is checked or unchecked. The default value is Default.

    See Also
    ShowCheckBox

    ChildPropertyName

    Gets or sets the property name for the child object where ItemsSource is used to define the items for this tree.

    Declaration
    public string ChildPropertyName { get; set; }
    Property Value
    Type Description
    System.String

    The child property name.

    Remarks

    Use this property only if you do not want to use the RequestTreeItems event to populate the tree nodes directly. You need to set this property to be the IEnumerable collection of root nodes for this tree if Nested collection is used. In self relational mode, ChildPropertyName and ParentPropertyName form the relation.

    ClipboardController

    Gets or sets an instance of the TreeGridClipboardController interface which controls the copy and paste operations in SfTreeGrid.

    Declaration
    public TreeGridClipboardController ClipboardController { get; set; }
    Property Value
    Type Description
    TreeGridClipboardController

    An instance of class that derives from TreeGridClipboardController interface. The default value is null.

    Remarks

    The TreeGridClipboardController class provides various properties and virtual methods to customize its operations.

    ColumnDragDropController

    Gets or sets an instance of the TreeGridColumnDragDropController which controls the column drag-and-drop operation in SfTreeGrid.

    Declaration
    public TreeGridColumnDragDropController ColumnDragDropController { get; set; }
    Property Value
    Type Description
    TreeGridColumnDragDropController

    An instance of the TreeGridColumnDragDropController class.

    Remarks

    TreeGridColumnDragDropController class provides various properties and virtual methods to customize its operations.

    ColumnResizingController

    Gets or sets an instance of the TreeGridColumnResizingController which controls the resizing operation in SfTreeGrid.

    Declaration
    public TreeGridColumnResizingController ColumnResizingController { get; set; }
    Property Value
    Type Description
    TreeGridColumnResizingController

    An instance of the TreeGridColumnResizingController class.

    Remarks

    TreeGridColumnResizingController class provides various properties and virtual methods to customize its operations.

    Columns

    Gets or sets the collection that contains all the columns in SfTreeGrid.

    Declaration
    public TreeGridColumns Columns { get; set; }
    Property Value
    Type Description
    TreeGridColumns

    The collection that contains all the columns in SfTreeGrid. This property has no default value.

    Remarks

    Each column associated with its own renderer and it controls the corresponding column related operations.

    Exceptions
    Type Condition
    System.NullReferenceException

    Thrown when the Columns value is set as null.

    See Also
    CellRenderers

    ColumnSizer

    Gets or sets an instance of the TreeGridColumnSizer which controls columns sizing and column width calculation.

    Declaration
    public TreeGridColumnSizer ColumnSizer { get; set; }
    Property Value
    Type Description
    TreeGridColumnSizer

    An instance of the TreeGridColumnSizer class.

    Remarks

    TreeGridColumnSizer class provides various properties and virtual methods to customize its operations.

    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 ColumnWidthMode property.

    CurrentColumn

    Gets or sets the column that contains the current cell.

    Declaration
    public TreeGridColumn CurrentColumn { get; set; }
    Property Value
    Type Description
    TreeGridColumn

    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.

    EnableRecursiveChecking

    Gets or sets a value which specifies whether recursive node checking is enabled or not. If recursive node checking enabled, node check box state will be changed based on its child or parent check box state.

    Declaration
    public bool EnableRecursiveChecking { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if Recursivechecking is enabled; otherwise, false. The default value is false.

    Remarks

    RecursiveChecking behavior can be changed by setting RecursiveCheckingMode property.

    ExpanderCellStyle

    Gets or sets the style applied to expander cells in SfTreeGrid.

    Declaration
    public Style ExpanderCellStyle { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Style

    The style that is applied to expander cells in SfTreeGrid. The default value is null.

    Remarks

    To define a Microsoft.UI.Xaml.Style for a cell, specify a TargetType of TreeGridExpanderCell.

    Examples
    <Page.Resources>
        <Style x:Key="expandercellstyle" TargetType="treeGrid:TreeGridExpanderCell">
            <Setter Property="Background" Value="Bisque"/>
        </Style>
    </Page.Resources>
    <treeGrid:SfTreeGrid  x:Name="sfTreeGrid"
                          ExpanderCellStyle="{StaticResource expandercellstyle}"
                          AutoExpandMode="RootNodesExpanded"
                          AutoGenerateColumns="True"
                          ChildPropertyName="Children"
                          ExpanderColumn="FirstName"
                          ItemsSource="{Binding Persons}">
    </treeGrid:SfTreeGrid>

    ExpanderCellStyleSelector

    Gets or sets the style applied to expander cells conditionally based on data in SfTreeGrid.

    Declaration
    public StyleSelector ExpanderCellStyleSelector { 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 TreeGridExpanderCell.

    See Also
    ExpanderCellStyle

    ExpanderColumn

    Gets or sets the column name which will be shown as expander column.

    Declaration
    public string ExpanderColumn { get; set; }
    Property Value
    Type Description
    System.String

    The expander column name.

    ExpanderContextFlyout

    Gets or sets the shortcut menu that appears on each expander column cells in SfTreeGrid.

    Declaration
    public MenuFlyout ExpanderContextFlyout { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Controls.MenuFlyout

    The shortcut menu for each expander column cells in SfTreeGrid. The default value is null.

    Remarks

    Command bound with MenuFlyoutItem receives TreeGridNodeContextFlyoutInfo as command parameter which contains the corresponding expander column cells with Child nodes.

    ExpandStateMappingName

    Gets or sets the value to the name of the property in a data object that associated with the tree node expanded or collapsed state.

    Declaration
    public string ExpandStateMappingName { get; set; }
    Property Value
    Type Description
    System.String

    The default value of ExpandStateMappingName is string.empty.

    FilterLevel

    Gets or sets a value that indicates how nodes should be filtered using Filter.

    Declaration
    public FilterLevel FilterLevel { get; set; }
    Property Value
    Type Description
    FilterLevel

    One of the FilterLevel enumeration that specifies how nodes should be filtered. The default value is All.

    FilterPopupStyle

    Gets or sets the style applied to the filter pop-up in SfTreeGrid.

    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 SfTreeGrid. The default value is null.

    Remarks

    To define a Microsoft.UI.Xaml.Style for a filter pop-up, specify a TargetType of TreeGridFilterControl.

    See Also
    FilterPopupTemplate
    FilterPopupTemplate
    FilterPopupStyle

    FilterPopupTemplate

    Gets or sets Microsoft.UI.Xaml.DataTemplate that defines the visual representation of the filter pop-up in SfTreeGrid.

    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
    FilterPopupTemplate
    FilterPopupStyle

    HeaderStyle

    Gets or sets the style applied to all the header cells in SfTreeGrid.

    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 SfTreeGrid. The default value is null.

    Remarks

    To define a Microsoft.UI.Xaml.Style for header cell, specify a TargetType of TreeGridHeaderCell.

    Examples
    <Page.Resources>
            <Style TargetType="treeGrid:TreeGridHeaderCell" x:Key="headerStyle">
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="FontSize" Value="14"/>
                <Setter Property="Background" Value="LightPink"/>
                <Setter Property="Foreground" Value="DarkBlue"/>
            </Style>
    </Page.Resources>
    <treeGrid:SfTreeGrid  x:Name="sfTreeGrid"
                          HeaderStyle="{StaticResource headerStyle}"
                          AutoExpandMode="RootNodesExpanded"
                          AutoGenerateColumns="True"
                          ChildPropertyName="Children"
                          ExpanderColumn="FirstName"
                          ItemsSource="{Binding Persons}">
    </treeGrid:SfTreeGrid>

    HeaderTemplate

    Gets or sets Microsoft.UI.Xaml.DataTemplate that defines the visual representation of the header cell in SfTreeGrid.

    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 SfTreeGrid. The default value is null.

    ItemsSource

    Gets or sets the collection that is used to generate the content of the SfTreeGrid.

    Declaration
    public object ItemsSource { get; set; }
    Property Value
    Type Description
    System.Object

    The collection that is used to generate the content of the SfTreeGrid. The default value is null.

    Remarks

    ItemsSourceChanged event will be raised when the ItemsSource property gets changed.

    LiveNodeUpdateMode

    Gets or sets a value to control data manipulation operations during data updates.

    Declaration
    public LiveNodeUpdateMode LiveNodeUpdateMode { get; set; }
    Property Value
    Type Description
    LiveNodeUpdateMode

    One of the LiveNodeUpdateMode that indicates how data manipulation operations are handled during data updates. The default value is Default.

    LoadOnDemandCommand

    Gets or sets the System.Windows.Input.ICommand which will be executed when click on the expander.

    Declaration
    public ICommand LoadOnDemandCommand { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    Command that used to load the data's based on demand.

    Remarks

    Return true in CanExecute method of this command to enable expander icon and also to execute on demand loading for that node, else return false.

    Examples
    <syncfusion:SfTreeGrid Name="treeGrid"
               LoadOnDemandCommand="{Binding LoadCommand}"
               ItemsSource="{Binding EmployeeDetails}"/>
    public class LoadCommand : ICommand
    {
       public event EventHandler CanExecuteChanged;
       public bool CanExecute(object parameter)
       {
           TreeNode node = (parameter as TreeNode);
           EmployeeInfo employeeInfo = node.Item as EmployeeInfo;
           if (employeeInfo != null)
               if (employeeInfo.ReportsTo == -1)
                   return true;
           return false;
       }
       public void Execute(object parameter)
       {
           TreeNode node = (parameter as TreeNode);
           EmployeeInfo employeeInfo = node.Item as EmployeeInfo;
           if (employeeInfo != null)
               node.PopulateChildNodes(GetReportees(employeeInfo.ID));
       }
    }

    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.

    ParentPropertyName

    Gets or sets the property name for the parent object where ItemsSource is used to define the items for this tree when a self-relation is determining the tree structure.

    Declaration
    public string ParentPropertyName { get; set; }
    Property Value
    Type Description
    System.String

    The parent property name.

    Remarks

    Use this property only if you do not want to use the RequestTreeItems event to populate the tree nodes directly. In self relational mode, ChildPropertyName and ParentPropertyName form the relation. It should be unique.

    RecursiveCheckingMode

    Gets or sets the value which indicates in which case recursive checking should be applied when EnableRecursiveChecking is true.

    Declaration
    public RecursiveCheckingMode RecursiveCheckingMode { get; set; }
    Property Value
    Type Description
    RecursiveCheckingMode

    The default value is Default.

    RowIndentMode

    Gets or sets a value that specifies the selection and row background indentation in row, when expander column is first column.

    Declaration
    public RowIndentMode RowIndentMode { get; set; }
    Property Value
    Type Description
    RowIndentMode

    One of the RowIndentMode enumeration the selection and background indentation in row. The default value is Default.

    RowStyle

    Gets or sets the style applied to the data rows in SfTreeGrid.

    Declaration
    public Style RowStyle { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Style

    The style that is applied to all data rows in SfTreeGrid. The default value is null.

    Remarks

    To define a Microsoft.UI.Xaml.Style for a row, specify a TargetType of TreeGridRowControl.

    RowStyleSelector

    Gets or sets the style applied to data row conditionally based on data in SfTreeGrid.

    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 TreeGridRowControl.

    See Also
    RowStyle

    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.

    SelectionController

    Gets or sets the instance of TreeGridBaseSelectionController which controls selection operations in SfTreeGrid.

    Declaration
    public TreeGridBaseSelectionController SelectionController { get; set; }
    Property Value
    Type Description
    TreeGridBaseSelectionController

    An instance of TreeGridBaseSelectionController.

    Remarks

    The default behavior of row selection can be customized by assigning the class derived from TreeGridRowSelectionController to SelectionController property.

    SelectionForeground

    Gets or sets a brush that will be applied as the foreground of selected row.

    Declaration
    public Brush SelectionForeground { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.Brush

    The brush that will be applied as the foreground of selected row. The default value is Black.

    SelfRelationRootValue

    Gets or sets the value that defines the root object in a self-relational mode when ItemsSource is used to define the underlying tree data.

    Declaration
    public object SelfRelationRootValue { get; set; }
    Property Value
    Type Description
    System.Object

    The root value for the relation item. The default registered value is null.

    SelfRelationUpdateMode

    Gets or sets a value that indicates how nodes should be arranged while changing ChildPropertyName and ParentPropertyName in Self Relational mode.

    Declaration
    public SelfRelationUpdateModes SelfRelationUpdateMode { get; set; }
    Property Value
    Type Description
    SelfRelationUpdateModes

    One of the SelfRelationUpdateMode enumeration that specifies how the nodes should be arranged. The default value is MoveOnEdit and MoveOnPropertyChange.

    ShowCheckBox

    Gets or sets a value which specifies whether checkbox should be displayed next to expander.

    Declaration
    public bool ShowCheckBox { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false.

    See Also
    CheckBoxSelectionMode
    EnableRecursiveChecking
    AllowTriStateChecking
    RecursiveCheckingMode

    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.

    TreeGridPanel

    Gets or sets the TreeGridPanel to arrange the data in panel.

    Declaration
    protected TreeGridPanel TreeGridPanel { get; set; }
    Property Value
    Type Description
    TreeGridPanel

    An instance of TreeGridPanel.

    View

    Gets the reference to the TreeGridView instance which manage the nodes, expand, collapse operations and sorting in SfTreeGrid.

    Declaration
    public TreeGridView View { get; set; }
    Property Value
    Type Description
    TreeGridView

    An instance of TreeGridView.

    Remarks

    View will be created based on ItemsSource you are setting. Below are the list of CollectionViews available in SfTreeGrid.

    1. TreeGridQueryableView
    2. TreeGridSelfRelationalView
    3. TreeGridUnboundReview

    Methods

    ArrangeOverride(Size)

    Arranges the content of the SfTreeGrid.

    Declaration
    protected override Size ArrangeOverride(Size arrangeBounds)
    Parameters
    Type Name Description
    Windows.Foundation.Size arrangeBounds

    The computed size that is used to arrange the content.

    Returns
    Type Description
    Windows.Foundation.Size

    The size consumed by SfTreeGrid.

    ClearFilter(TreeGridColumn)

    Clears the filters for the particular column.

    Declaration
    public void ClearFilter(TreeGridColumn column)
    Parameters
    Type Name Description
    TreeGridColumn column

    The corresponding column to clear the filters.

    ClearFilter(String)

    Clears the filters for the particular column.

    Declaration
    public void ClearFilter(string columnName)
    Parameters
    Type Name Description
    System.String columnName

    The MappingName of the corresponding column to clear the filters.

    ClearFilters()

    Clears the filters for all the columns in SfTreeGrid.

    Declaration
    public void ClearFilters()

    ClearSelections(Boolean)

    Clears all the selection present in SfTreeGrid.

    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.

    CollapseAllNodes()

    Collapses all the nodes in SfTreeGrid.

    Declaration
    public void CollapseAllNodes()

    CollapseAllNodes(TreeNode)

    Collapses the particular node and all its child nodes in SfTreeGrid.

    Declaration
    public void CollapseAllNodes(TreeNode node)
    Parameters
    Type Name Description
    TreeNode node

    Specifies which node to be collapsed.

    CollapseNode(TreeNode)

    Collapses the particular node in SfTreeGrid.

    Declaration
    public void CollapseNode(TreeNode node)
    Parameters
    Type Name Description
    TreeNode node

    Specifies which node to be collapsed.

    CollapseNode(Int32)

    Collapses the node in particular rowIndex.

    Declaration
    public void CollapseNode(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row index which contains the node to be collapsed.

    Dispose(Boolean)

    Disposes all the resources used by the SfTreeGrid class.

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

    Specifies that need to disposed or not.

    Overrides
    SfGridBase.Dispose(Boolean)

    EnsureViewProperties()

    Ensures selection related operations in View.

    Declaration
    protected void EnsureViewProperties()

    ExpandAllNodes()

    Expands all the nodes in SfTreeGrid.

    Declaration
    public void ExpandAllNodes()

    ExpandAllNodes(TreeNode)

    Expands the particular node and all its child nodes in SfTreeGrid.

    Declaration
    public void ExpandAllNodes(TreeNode node)
    Parameters
    Type Name Description
    TreeNode node

    Specifies which node to be expanded.

    ExpandAllNodes(Int32)

    Expands all the nodes in SfTreeGrid up to given level.

    Declaration
    public void ExpandAllNodes(int level)
    Parameters
    Type Name Description
    System.Int32 level

    Specifies how many levels to be expanded.

    ExpandNode(TreeNode)

    Expands the particular node in SfTreeGrid.

    Declaration
    public void ExpandNode(TreeNode node)
    Parameters
    Type Name Description
    TreeNode node

    Specifies which node to be expanded.

    ExpandNode(Int32)

    Expands the node in particular rowIndex.

    Declaration
    public void ExpandNode(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row index which contains the node to be expanded.

    GetCheckedNodes(Boolean)

    Returns the checked nodes in SfTreeGrid.

    Declaration
    public ObservableCollection<TreeNode> GetCheckedNodes(bool includeAllNodes = false)
    Parameters
    Type Name Description
    System.Boolean includeAllNodes

    which specifies whether need to include the nodes which are not in view.

    Returns
    Type Description
    System.Collections.ObjectModel.ObservableCollection<TreeNode>

    Collection of TreeNode.

    MeasureOverride(Size)

    Determines the desired size of the SfTreeGrid.

    Declaration
    protected override Size MeasureOverride(Size constraint)
    Parameters
    Type Name Description
    Windows.Foundation.Size constraint

    The size that the SfTreeGrid can occupy.

    Returns
    Type Description
    Windows.Foundation.Size

    The desired size of SfTreeGrid.

    OnApplyTemplate()

    Builds the visual tree for the SfTreeGrid 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 TreeGridAutomationPeer object for the SfTreeGrid.

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type Description
    Microsoft.UI.Xaml.Automation.Peers.AutomationPeer

    Returns new instance of TreeGridAutomationPeer for the SfTreeGrid.

    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 SfTreeGrid.

    RefreshHeaderLineCount()

    Updates the frozen rows count.

    Declaration
    protected virtual void RefreshHeaderLineCount()

    RefreshPanelAndView()

    Refreshes TreeGridPanel and View properties based on SfTreeGrid property settings.

    Declaration
    protected virtual void RefreshPanelAndView()
    Examples

    The View.CurrentItem updated based on SfTreeGrid.CurrentItem property.

    RepopulateTree()

    Repopulate the tree in on demand loading.

    Declaration
    public void RepopulateTree()
    Remarks

    You can use this event when RequestTreeItems event is used to populate the tree.

    ResetNode(TreeNode)

    Resets the child nodes of the particular node and repopulate child nodes.

    Declaration
    public void ResetNode(TreeNode treeNode)
    Parameters
    Type Name Description
    TreeNode treeNode

    Specifies the node to be reset.

    ScrollInView(RowColumnIndex)

    Scrolls the SfTreeGrid 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()

    Selects all the rows in SfTreeGrid.

    Declaration
    public void SelectAll()
    Remarks

    This method only works for Multiple and Extended mode selection.

    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.

    UnWireEvents()

    Unwires the events associated with the SfDataGrid.

    Declaration
    protected virtual void UnWireEvents()

    WireEvents()

    Wires the events associated with the SfDataGrid.

    Declaration
    protected virtual void WireEvents()

    Events

    AutoGeneratingColumn

    Occurs when column is generated for the properties in underlying data object.

    Declaration
    public event EventHandler<TreeGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn
    Event Type
    Type
    System.EventHandler<TreeGridAutoGeneratingColumnEventArgs>
    Remarks

    You can cancel or customize the column being created using the TreeGridAutoGeneratingColumnEventArgs event argument.

    CellDoubleTapped

    Occurs when the user double clicks or touch the cell in SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridCellDoubleTappedEventArgs> CellDoubleTapped
    Event Type
    Type
    System.EventHandler<TreeGridCellDoubleTappedEventArgs>
    Remarks

    CellDoubleTapped does not occurs when the end user double clicks or touch the non-selectable cells.

    CellTapped

    Occurs when the user clicks or touch the cell in SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridCellTappedEventArgs> CellTapped
    Event Type
    Type
    System.EventHandler<TreeGridCellTappedEventArgs>
    Remarks

    CellTapped does not occurs when the end user clicks or touch the non-selectable cells.

    CellToolTipOpening

    Occurs when the user hovers the cell in SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridCellToolTipOpeningEventArgs> CellToolTipOpening
    Event Type
    Type
    System.EventHandler<TreeGridCellToolTipOpeningEventArgs>
    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<TreeGridColumnDraggingEventArgs> ColumnDragging
    Event Type
    Type
    System.EventHandler<TreeGridColumnDraggingEventArgs>
    Remarks

    You can cancel the column being dragged through TreeGridColumnDraggingEventArgs event argument.

    CopyCellContent

    Occurs when each cell in the selected cells or rows being copied from SfTreeGrid into clipboard.

    Declaration
    public event EventHandler<TreeGridCopyPasteCellEventArgs> CopyCellContent
    Event Type
    Type
    System.EventHandler<TreeGridCopyPasteCellEventArgs>
    Remarks

    You can cancel or customize each cell is being copied from the selected cells or rows through TreeGridCopyPasteCellEventArgs event argument.

    CopyContent

    Occurs when the selected cells or rows in SfTreeGrid is being copied to clipboard.

    Declaration
    public event EventHandler<GridCopyPasteEventArgs> CopyContent
    Event Type
    Type
    System.EventHandler<GridCopyPasteEventArgs>
    Remarks

    You can cancel or customize the content being copied from a SfTreeGrid through GridCopyPasteEventArgs event argument.

    CurrentCellActivated

    Occurs after the current cell is activated in SfTreeGrid.

    Declaration
    public event EventHandler<CurrentCellActivatedEventArgs> CurrentCellActivated
    Event Type
    Type
    System.EventHandler<CurrentCellActivatedEventArgs>
    Remarks

    This event occurs after the CurrentCellActivatingEventArgs event if that event is not canceled.

    CurrentCellActivating

    Occurs when the current cell is being activated in SfTreeGrid.

    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 SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridCurrentCellBeginEditEventArgs> CurrentCellBeginEdit
    Event Type
    Type
    System.EventHandler<TreeGridCurrentCellBeginEditEventArgs>
    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>

    CurrentCellEndEdit

    Occurs when the edit mode ends for the current cell.

    Declaration
    public event EventHandler<CurrentCellEndEditEventArgs> CurrentCellEndEdit
    Event Type
    Type
    System.EventHandler<CurrentCellEndEditEventArgs>

    CurrentCellRequestNavigate

    Occurs when the GridHyperLinkColumn's cell is request for navigation.

    Declaration
    public event EventHandler<CurrentCellRequestNavigateEventArgs> CurrentCellRequestNavigate
    Event Type
    Type
    System.EventHandler<CurrentCellRequestNavigateEventArgs>

    CurrentCellValidated

    Occurs after the current cell validated.

    Declaration
    public event EventHandler<TreeGridCurrentCellValidatedEventArgs> CurrentCellValidated
    Event Type
    Type
    System.EventHandler<TreeGridCurrentCellValidatedEventArgs>
    Remarks

    This event occurs after the TreeGridCurrentCellValidatedEventArgs 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<TreeGridCurrentCellValidatingEventArgs> CurrentCellValidating
    Event Type
    Type
    System.EventHandler<TreeGridCurrentCellValidatingEventArgs>
    Remarks

    You can cancel or customize the current cell being validated through the TreeGridCurrentCellValidatingEventArgs event argument.

    CurrentCellValueChanged

    Occurs when the current cell value Changes.

    Declaration
    public event EventHandler<TreeGridCurrentCellValueChangedEventArgs> CurrentCellValueChanged
    Event Type
    Type
    System.EventHandler<TreeGridCurrentCellValueChangedEventArgs>

    FilterChanged

    Occurs after the column is filtered in the SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridFilterChangedEventArgs> FilterChanged
    Event Type
    Type
    System.EventHandler<TreeGridFilterChangedEventArgs>

    FilterChanging

    Occurs when the column is being filtered in the SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridFilterChangingEventArgs> FilterChanging
    Event Type
    Type
    System.EventHandler<TreeGridFilterChangingEventArgs>

    FilterItemsPopulated

    Occurs after the items have been populated to the filter control in the SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridFilterItemsPopulatedEventArgs> FilterItemsPopulated
    Event Type
    Type
    System.EventHandler<TreeGridFilterItemsPopulatedEventArgs>

    FilterItemsPopulating

    Occurs when the items are being populated to the filter control in the SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridFilterItemsPopulatingEventArgs> FilterItemsPopulating
    Event Type
    Type
    System.EventHandler<TreeGridFilterItemsPopulatingEventArgs>

    ItemsSourceChanged

    Occurs when the ItemsSource changed.

    Declaration
    public event EventHandler<TreeGridItemsSourceChangedEventArgs> ItemsSourceChanged
    Event Type
    Type
    System.EventHandler<TreeGridItemsSourceChangedEventArgs>
    Remarks

    The View can be accessed here.

    NodeCheckStateChanged

    Occurs after expander node check box is checked.

    Declaration
    public event EventHandler<NodeCheckStateChangedEventArgs> NodeCheckStateChanged
    Event Type
    Type
    System.EventHandler<NodeCheckStateChangedEventArgs>

    NodeCollapsed

    Occurs after the Node is collapsed.

    Declaration
    public event EventHandler<NodeCollapsedEventArgs> NodeCollapsed
    Event Type
    Type
    System.EventHandler<NodeCollapsedEventArgs>

    NodeCollapsing

    Occurs when the Node is being collapsed.

    Declaration
    public event EventHandler<NodeCollapsingEventArgs> NodeCollapsing
    Event Type
    Type
    System.EventHandler<NodeCollapsingEventArgs>
    Remarks

    You can cancel the Node being collapsed through NodeCollapsingEventArgs event argument.

    NodeExpanded

    Occurs after the Node is expanded.

    Declaration
    public event EventHandler<NodeExpandedEventArgs> NodeExpanded
    Event Type
    Type
    System.EventHandler<NodeExpandedEventArgs>

    NodeExpanding

    Occurs when the Node is being expanded.

    Declaration
    public event EventHandler<NodeExpandingEventArgs> NodeExpanding
    Event Type
    Type
    System.EventHandler<NodeExpandingEventArgs>
    Remarks

    You can cancel the Node being expanded through NodeExpandedEventArgs event argument.

    PasteCellContent

    Occurs when each cell is being pasted from clipboard to SfTreeGrid control.

    Declaration
    public event EventHandler<TreeGridCopyPasteCellEventArgs> PasteCellContent
    Event Type
    Type
    System.EventHandler<TreeGridCopyPasteCellEventArgs>
    Remarks

    You can cancel or customize each cell is being pasted from the clipboard through TreeGridCopyPasteCellEventArgs event argument.

    PasteContent

    Occurs when the clipboard value is being pasted to SfTreeGrid.

    Declaration
    public event EventHandler<GridCopyPasteEventArgs> PasteContent
    Event Type
    Type
    System.EventHandler<GridCopyPasteEventArgs>
    Remarks

    You can cancel or customize the content is being pasted from clipboard to SfTreeGrid through GridCopyPasteEventArgs event argument.

    QueryCoveredRange

    Occurs to query the range to merge for particular cell.

    Declaration
    public event EventHandler<TreeGridQueryCoveredRangeEventArgs> QueryCoveredRange
    Event Type
    Type
    System.EventHandler<TreeGridQueryCoveredRangeEventArgs>

    RequestTreeItems

    This event is used to request an IEnumerable object that holds the child item objects for a particular parent item in on demand loading.

    Declaration
    public event EventHandler<TreeGridRequestTreeItemsEventArgs> RequestTreeItems
    Event Type
    Type
    System.EventHandler<TreeGridRequestTreeItemsEventArgs>
    Remarks

    In the TreeGridRequestTreeItemsEventArgs parent object will be passed,
    and your event handler needs to provide an IEnumerable object that contains the child objects for this parent object. If the parent object is null, you should provide the collection of root objects for the tree.

    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 treenode is dragged within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDragOverEventArgs> RowDragOver
    Event Type
    Type
    System.EventHandler<TreeGridRowDragOverEventArgs>

    RowDragStarting

    This event occurs when a drag-and-drop operation is starting.

    Declaration
    public event EventHandler<TreeGridRowDragStartingEventArgs> RowDragStarting
    Event Type
    Type
    System.EventHandler<TreeGridRowDragStartingEventArgs>

    RowDropped

    This event occurs when a record is dropped within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDroppedEventArgs> RowDropped
    Event Type
    Type
    System.EventHandler<TreeGridRowDroppedEventArgs>

    RowDropping

    This event occurs when a record is dropping within the target SfTreeGrid.

    Declaration
    public event EventHandler<TreeGridRowDroppingEventArgs> RowDropping
    Event Type
    Type
    System.EventHandler<TreeGridRowDroppingEventArgs>

    RowValidated

    Occurs after the row is validated.

    Declaration
    public event EventHandler<TreeGridRowValidatedEventArgs> RowValidated
    Event Type
    Type
    System.EventHandler<TreeGridRowValidatedEventArgs>
    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<TreeGridRowValidatingEventArgs> RowValidating
    Event Type
    Type
    System.EventHandler<TreeGridRowValidatingEventArgs>
    Remarks

    You can cancel the row is being validated through the TreeGridRowValidatingEventArgs 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 both UI and programmatic selection.

    SelectionChanging

    Occurs when the selection is being changed in SfTreeGrid.

    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 both UI and programmatic selection.

    SortColumnsChanged

    Occurs after the column is sorted in SfTreeGrid.

    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 canceled.

    SortColumnsChanging

    Occurs when the column is being sorted in SfTreeGrid.

    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.

    TreeGridContextFlyoutOpening

    Occurs before the shortcut menu/context flyout opened.

    Declaration
    public event EventHandler<TreeGridContextFlyoutEventArgs> TreeGridContextFlyoutOpening
    Event Type
    Type
    System.EventHandler<TreeGridContextFlyoutEventArgs>
    Remarks

    To handle or change the shortcut menu being opened through the TreeGridContextFlyoutEventArgs event argument.

    Implements

    System.IDisposable

    Extension Methods

    TreeGridIndexResolver.GetNodeAtRowIndex(SfTreeGrid, Int32)
    TreeGridIndexResolver.ResolveToRowIndex(SfTreeGrid, TreeNode)
    TreeGridIndexResolver.ResolveToRowIndex(SfTreeGrid, Object)
    TreeGridIndexResolver.ResolveToRowIndex(SfTreeGrid, Int32)
    TreeGridIndexResolver.ResolveToNodeIndex(SfTreeGrid, Int32)
    TreeGridIndexResolver.GetHeaderIndex(SfTreeGrid)
    TreeGridIndexResolver.ResolveToGridVisibleColumnIndex(SfTreeGrid, Int32)
    TreeGridIndexResolver.ResolveToScrollColumnIndex(SfTreeGrid, Int32)
    TreeGridIndexResolver.ResolveToStartColumnIndex(SfTreeGrid)
    TreeGridExcelExportExtensions.ExportToExcel(SfTreeGrid, TreeGridExcelExportOptions)
    TreeGridExcelExportExtensions.ExportToExcel(SfTreeGrid, TreeGridExcelExportOptions, IWorksheet)
    TreeGridExcelExportExtensions.ExportToExcel(SfTreeGrid, TreeGridExcelExportOptions, IWorkbook)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved