How to correctly implement a Hierarchical Numbering Column in Gantt Chart?
Gantt Chart by default has a column `ID` displaying tasks' primary key. But what I need is a column like this:
My current implementation and Question are:
Current Implementation: Database-side hierarchy numbering
• Added two PostgreSQL triggers (compute_hierarchyandrenumber_siblings) so that any insert/delete/update will recalcHierarchyNumberon the fly.
• All backend endpoints reload the entity after save, so your triggers always fill in the latest numbers before you return data.Question: The UI gap
• When you delete a task, the DB trigger correctly renumbers its siblings and your batch endpoint returns those updated siblings in changedRecords.
• Problem: Syncfusion Gantt isn’t automatically rebinding those sibling rows, so the grid keeps showing the old numbers.Two paths forward
- Manual refresh
• InactionComplete(or use a component ref), call.refresh()(or loopupdateRecordByID) to force the grid to redraw.
• ✅ This works, but it bypasses the built-in DataManager mechanism. - Batch-mode via DataManager
• Leverage UrlAdaptor’s support for{ action: 'batch', addedRecords, changedRecords, deletedRecords }.
• The Gantt in Batch edit mode should consume those arrays and update exactly the affected rows without a full refresh.
• Current hitch: We’ve setbatchUrl,editSettings.mode='Batch', and returned the correct arrays, but the grid still fires single-record saves or doesn’t trigger its internalbatchSavepath.
- Manual refresh
Why this is tricky
• Syncfusion’s docs show how to toggle “Cell” vs. “Batch” edit, but they don’t explicitly spell out the URL-shape or event sequence.
• In practice, Gantt will only apply your changedRecords when its own requestType is exactlybatchSave. Anything else (single-save, refresh, etc.) drops that array.
please help, thanks
code is here:
Hi Ryan,
Greetings from Syncfusion.
Thank you for your detailed explanation.
From your description, it seems that you are looking for functionality similar to Work Breakdown Structure (WBS) numbering. We're happy to inform you that WBS support is planned and will be included in our upcoming Volume 2 main release, scheduled for the end of June 2025.
With this feature, you can enable a built-in WBS column that auto-generates hierarchical numbering (e.g., 1, 1.1, 1.2, 2, 2.1, etc.) and updates automatically during operations like row drag-and-drop and CRUD actions. Please note that the WBS values are internally generated and cannot be manually mapped to a data source field.
Could you please confirm if this upcoming feature aligns with your requirement, or if you are looking for a different kind of functionality?
Regards,
Sridharan
Thank you for the reply. It's exactly what I was looking for, good work Syncfusion Team
Hi
Ryan,
Thanks for your patience.
We are glad to announce that our Essential Studio 2025 Volume 2 main
release v30.1.37 is rolled out and is available for download under the
following link.
Thank
you for your support and appreciate your patience in waiting for this release.
Please get in touch with us if you would require any further assistance.
The improvement feature “WBS support" has been rolled out in
our Volume 2 Main Release v30.1.37. So upgrade to our
latest version to resolve the problem.
Release
Notes - https://ej2.syncfusion.com/react/documentation/release-notes/30.1.37?type=all#ganttchart
To use WBS feature in your application:
- Enable WBS Support
Set the enableWBS property to true to automatically generate WBS codes and WBS predecessors for all tasks. - Auto-Update WBS Codes
Set the enableAutoWbsUpdate property to true to ensure that WBS codes are recalculated automatically whenever the task hierarchy changes (e.g., tasks are moved or restructured). - Display WBS Codes
Use the WBSCode field in the column definitions to display the generated WBS codes in the Gantt chart grid.
|
const DragAndDrop = () => { return ( <GanttComponent enableWBS={true} enableAutoWbsUpdate={true} > <ColumnsDirective> <ColumnDirective field="WBSCode" width="150px" /> </ColumnsDirective> <Inject services={[Edit, RowDD, Selection]} /> </GanttComponent> ); };
|
Sample - https://stackblitz.com/edit/react-g9qxufje-tkswbjx6?file=index.js
Demo - Gantt Chart · WBS Column · Syncfusion React UI Components
If
you have any further questions or need additional assistance, please let me
know!
Regards,
Ajithkumar G
- 3 Replies
- 3 Participants
- Marked answer
-
RY Ryan.L
- Jun 14, 2025 04:54 PM UTC
- Jun 30, 2025 09:28 AM UTC