Is it possible to pin a particular row at the top when sorting?

I have tried the sortComparer property of ColumnDirective, but it only references the value of that column.

For example, when sorting by task name or start date, is it possible to display the task with a task ID of 1 on the first line?


3 Replies

SJ Sridharan Jayabalan Syncfusion Team July 8, 2025 01:35 PM UTC

Hi Akira,

 

Greetings from Syncfusion.

 

Thanks for your query regarding pinning a specific row, such as the one with Task ID 1, at the top of the Gantt chart during sorting. Based on the current behavior of the Gantt chart, it is not possible to pin a particular row at the top while sorting.

 

This limitation exists due to the hierarchical tree structure used in the Gantt chart:

 

  1. Hierarchy preservation: If a child row is pinned, its parent row must also be displayed to maintain the correct visual and relational structure. If the parent has other children, they will also be shown, which brings in additional rows that are not intended to be pinned. This breaks the expected sorting behavior.
  2. Indentation and structure: Even when trying to isolate and pin a single row, it leads to indentation mismatches. The TreeGrid requires each child to be rendered within a valid parent record. Without this, the layout becomes inconsistent and visually incorrect.

 

Hence, due to these structural constraints, pinning a specific row independently is not supported in the current Gantt chart implementation.

 

 

Regards,

Sridharan



AK Akira Kume July 9, 2025 02:13 AM UTC

Hi, Sridharan

Understood.

Thank you for your response.



SJ Sridharan Jayabalan Syncfusion Team July 9, 2025 11:30 AM UTC

Akira,


You're welcome! Please feel free to contact us for any future support, we’ll be happy to assist you.


Regards,

Sridharan

 


Loader.
Up arrow icon