Migrate from GridTreeControl to SfTreeGrid

29 Aug 20242 minutes to read

To facilitate the migration from GridTreeControl to SfTreeGrid, aimed at integrating drag-and-drop, filtering, and sorting capabilities into the GanttGrid, this transition results in the breaking of certain APIs and the introduction of new ones. Please find the differences in the following topics.

Assembly references

Removed Assemblies Added Assemblies
Syncfusion.Grid.WPF
Syncfusion.GridCommon.WPF
Syncfusion.SfGrid.WPF

Namespace

Removed Namespaces Added Namespaces
Syncfusion.Windows.Controls.Gantt.Grid
Syncfusion.Windows.Controls.Gantt.Schedule
Syncfusion.Windows.Controls.Gantt.Chart
Syncfusion.Windows.Controls.Gantt

GanttGrid class API breaking

Class

Class Names Existing Base Classes New Base Classes

GanttGrid

GridTreeControl

SfTreeGrid

Properties

Existing API Types Existing API Names New API Types New API Names
ObservableCollection(GridTreeColumn)

Columns

TreeGridColumns

Columns

GridTreeStartUpExpandState

ExpandStateAtStartUp

AutoExpandMode

AutoExpandMode

bool

ReadOnly

bool

IsReadOnly

GridSelectedTreeNodes

SelectedNodes

ObservableCollection(object)

SelectedItems

Methods

Events

Enums

Existing Names Existing Members New Names New Members

GridSelectionMode

MouseMove
MouseClick

SelectionMode

None
Single
Multiple

GridTreeNodeActions

Expanding
Expanded
Collapsing
Collapsed
Selecting
Unselecting

AutoExpandMode

None
RootNodesExpanded
AllNodesExpanded

VisualStyle

Office 2010 Blue Style
Office2010Blue
Office2010Black
Office2010Silver
Metro
Blend
VS2010
Nil Nil

Column types

Removed public classes

Removed theme

  • Blend
  • Metro
  • Office2010Black
  • Office2010Silver
  • VS2010

Removed API

Class Names Property Types Property Names

GanttControl

VisualStyle

VisualStyle

Access type changed classes

Class Names Base Classes Existing Access Types Changed Access Types
CollectionToStringConverter IValueConverter internal public
BoolToVisibilityConverter IValueConverter internal public

Newly added APIs

Properties

Names Types Default Values Summaries

AllowDragDrop

bool true Gets or sets a value indicating whether to allow the nodes reordering in Gantt.

AutoExpandMode

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

AllowSorting

bool false Gets or sets a value indicating whether to allow sorting of records in Gantt.

AllowFiltering

bool false Gets or sets a value indicating whether to allow filtering of records in Gantt.

Events

Event Names EventArg Names Summaries

TreeGridNodeDragStarting

TreeGridNodeDragStartingEventArgs Provides data for the TreeGridNodeDragStarting event, which occurs when an item is to be dragged.

TreeGridNodeDragging

TreeGridNodeDraggingEventArgs Provides data for the TreeGridNodeDragging event, which occurs when an item is being dragged over the GanttControl.

TreeGridNodeDrop

TreeGridNodeDropEventArgs Provides data for the TreeGridNodeDrop event, which occurs when an item to be dropped within GanttControl.

SelectionChanging

SelectionChangingEventArgs Occurs when the selection is being changed in the Gantt.

SelectionChanged

SelectionChangedEventArgs Occurs when the selection is changed in the Gantt.

Gantt.MVVM.WPF

To make the migration from GridTreeControl to SfTreeGrid, integrating drag-and-drop, filtering, and sorting into the Gantt grid, this transition breaks certain APIs and introduces new ones. Please find the differences in the following topics.

Assembly references

Removed Assemblies Added Assemblies
Syncfusion.Grid.WPF
Syncfusion.GridCommon.WPF
Syncfusion.SfGrid.WPF

Alternate events

GridTreeControl Structure GridTreeControl - Event name SfTreeGrid Structure SfTreeGrid - Event name Summary

GridTreeRequestTreeItemsEventArgs

RequestTreeItems

TreeGridRequestTreeItemsEventArgs

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.

SyncfusionRoutedEventArgs

ItemsSourceChanged

TreeGridItemsSourceChangedEventArgs

ItemsSourceChanged

Occurs when the ItemsSource changed.

GridTreeNodeCancelEventArgs

ExpandStateChanging

NodeExpandingEventArgs


NodeCollapsingEventArgs

NodeExpanding


NodeCollapsing

Occurs when the node is being expanded or collapsed.

GridTreeNodeEventArgs

ExpandStateChanged

NodeExpandedEventArgs


NodeCollapsedEventArgs

NodeExpanded


NodeCollapsed

Occurs after the node is expanded or collapsed.

Alternate commands

ExpandStateChanging

GridTreeControl Commands SfTreeGrid Commands
GanttGridExpandStateChangingCommandBehaviorWithEventArgs GanttGridNodeExpandingCommandBehaviorWithEventArgs
GanttGridNodeCollapsingCommandBehaviorWithEventArgs
GanttGridExpandStateChangingCommandWithEventArgs GanttGridNodeExpandingCommandWithEventArgs
GanttGridNodeCollapsingCommandWithEventArgs
GanttGridExpandStateChangingCommandBehavior GanttGridNodeExpandingCommandBehavior
GanttGridNodeCollapsingCommandBehavior
GanttGridExpandStateChangingCommand GanttGridNodeExpandingCommand
GanttGridNodeCollapsingCommand
GanttGridExpandStateChangingCommandBehavior GanttGridNodeExpandingCommandBehavior
GanttGridNodeCollapsingCommandBehavior
GanttGridExpandStateChangingCommand GanttGridNodeExpandingCommand
GanttGridNodeCollapsingCommand

ExpandStateChanged

GridTreeControl Commands SfTreeGrid Commands
GanttGridExpandStateChangedCommandBehaviorWithEventArg GanttGridNodeExpandedCommandBehaviorWithEventArg
GanttGridNodeCollapsedCommandBehaviorWithEventArgs
GanttGridExpandStateChangedCommandWithEventArgs GanttGridNodeExpandedCommandWithEventArgs
GanttGridNodeCollapsedCommandWithEventArgs
GanttGridExpandStateChangedCommandBehavior GanttGridNodeExpandedCommandBehavior
GanttGridNodeCollapsedCommandbehavior
GanttGridExpandStateChangedCommand GanttGridNodeExpandStateChangedCommand
GanttGridNodeCollapsedCommand
GanttGridExpandStateChangedCommandBehavior GanttGridNodeExpandedCommandBehavior
GanttGridNodeCollapsedCommandbehavior
GanttGridExpandStateChangedCommand GanttGridNodeExpandedCommand
GanttGridNodeCollapsedCommand

Deprecated events

These events are deprecated. The GridTreeControl has been replaced by the SfTreeGrid in the GanttControl.

Structures Event Names Summaries
EventHandler

NodesPopulated

Occurs after the nodes are populated in the Grid.
EventHandler

RequestNodeImage

This event is used to request an image for the specified node item. This event is only raised if SupportNodeImages is true.

EventHandler< GridTreeCreatingNodeEventArgs>

CreatingTreeNode

Event which is raised as GridTreeNodes are created so derived tree nodes can be used.

EventHandler< SyncfusionRoutedEventArgs>

ParentPropertyNameChanged

Occurs when ParentPropertyName are being changed.

EventHandler< SyncfusionRoutedEventArgs>

ChildPropertyNameChanged

Occurs when ChildPropertyName are being changed.