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 |
|---|---|---|
Properties
| Existing API Types | Existing API Names | New API Types | New API Names |
|---|---|---|---|
| ObservableCollection(GridTreeColumn) | |||
| bool | bool | ||
| ObservableCollection(object) |
Methods
| Existing Methods | New Methods |
|---|---|
Events
| Existing Structures | Existing Names | New Structures | New Names |
|---|---|---|---|
|
|
|
||
|
|
|
||
Enums
| Existing Names | Existing Members | New Names | New Members |
|---|---|---|---|
| MouseMove MouseClick |
None Single Multiple |
||
| Expanding Expanded Collapsing Collapsed Selecting Unselecting |
None RootNodesExpanded AllNodesExpanded |
||
| Office 2010 Blue Style Office2010Blue Office2010Black Office2010Silver Metro Blend VS2010 |
Nil | Nil |
Column types
| GridTreeControl | SfTreeGrid |
|---|---|
|
|
Removed public classes
| Class Names | Base Classes |
|---|---|
| Enum | |
| Enum |
Removed theme
- Blend
- Metro
- Office2010Black
- Office2010Silver
- VS2010
Removed API
| Class Names | Property Types | Property Names |
|---|---|---|
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 |
|---|---|---|---|
| bool | true | Gets or sets a value indicating whether to allow the nodes reordering in Gantt. | |
| GanttAutoExpandMode | AllNodesExpanded | Gets or sets the value which indicates how the nodes to be expanded while loading. | |
| bool | false | Gets or sets a value indicating whether to allow sorting of records in Gantt. | |
| bool | false | Gets or sets a value indicating whether to allow filtering of records in Gantt. |
Events
| Event Names | EventArg Names | Summaries |
|---|---|---|
| TreeGridNodeDragStartingEventArgs | Provides data for the TreeGridNodeDragStarting event, which occurs when an item is to be dragged. | |
| TreeGridNodeDraggingEventArgs | Provides data for the TreeGridNodeDragging event, which occurs when an item is being dragged over the GanttControl. | |
| TreeGridNodeDropEventArgs | Provides data for the TreeGridNodeDrop event, which occurs when an item to be dropped within GanttControl. | |
| SelectionChangingEventArgs | Occurs when the selection is being changed in the Gantt. | |
| 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 |
|---|---|---|---|---|
| This event is used to request an IEnumerable object that holds the child item objects for a particular parent item in on demand loading. | ||||
| Occurs when the ItemsSource changed. | ||||
|
|
|
Occurs when the node is being expanded or collapsed. | ||
|
|
|
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 | Occurs after the nodes are populated in the Grid. | |
| EventHandler | This event is used to request an image for the specified node item. This event is only raised if SupportNodeImages is true. | |
| Event which is raised as GridTreeNodes are created so derived tree nodes can be used. | ||
| Occurs when ParentPropertyName are being changed. | ||
| Occurs when ChildPropertyName are being changed. |