Adding Custom Column to GanttGrid.cs

We want to Add a custom columns on GanttGrid, with tri-state Button or our own custom user control in the cell. so please help with some sample code to add button in a cell

3 Replies

SG Sridharan Gajendran Syncfusion Team December 26, 2017 07:24 AM UTC

Hi Omar, 

Thanks for contacting Syncfusion Support. 

We have achieved your requirement in the sample level. Please find the demo sample from below location. 

 
Regards, 
Sridharan 



OB Omar Barlas December 27, 2017 04:00 PM UTC

1. Is there a way that Gantt Chart Bar snaps to full Day, instead of Hours, currently as we it from either side it shows changes in Hours, while in our case minimum unit is Days, so we would like it to snap to Days as user moves it from either side

2. Duration Column should also not show value in fractions, we just need to see Rounded Value in Days, not like 5.12485 (See the screen shot attached)

3. What is the First Column ID associated with , and what is it representing, We want to bind it to our own ItemNumber Field (which is in our Model and tranformed to TaskDetail.ItemNumber). Please let us know how to change it to show our ItemNumber values in that column

4. How can we delete Predecessors Relationship from right side, at the moment i only see option to delete it from Predecessors column (Which we do NOT want to show in GanttGrid), If we can Delete the dependency by Right Click , or Tap and Hold, or by double Click on the Dependency line, if there is another way to delete it than please let us know

Attachment: gantt_e834a00.zip


VR Vignesh Ramesh Syncfusion Team January 2, 2018 01:00 PM UTC

Hi Omar, 
 
Thanks for contacting Syncfusion Support. 
 
Please find the response for your queries below, 
 
Query 
Response 
Is there a way that Gantt Chart Bar snaps to full Day, instead of Hours, currently as we it from either side it shows changes in Hours, while in our case minimum unit is Days, so we would like it to snap to Days as user moves it from either side 
Please give us more details on this requirement. Whether your requirement is as follows 
 
Behavior: 
If Bottom tier’s IntervalType is Days or higher than Days then the task drag or resized to day. Suppose the Bottom Tier’s IntervalType is Hours means then task drag or resized to Hour, like wise for Minutes case too. 
 
Please let us know your concern. 
Duration Column should also not show value in fractions, we just need to see Rounded Value in Days, not like 5.12485 (See the screen shot attached) 
We have achieved your requirement in sample level to display the rounded values in Duration column. 
What is the First Column ID associated with , and what is it representing, We want to bind it to our own ItemNumber Field (which is in our Model and tranformed to TaskDetail.ItemNumber). Please let us know how to change it to show our ItemNumber values in that column 
Gantt grid’s first column representing serial number, If you need to display the Task ID means you can customize the VisibleGridColumns Property as like in the below code sample. 
 
Code sample: 
 
[XAML]: 
<sfGantt:SfGantt VisibleGridColumns="ID,Name,StartDate,FinishDate,Duration,Resources"> 
</sfGantt:SfGantt> 
 
How can we delete Predecessors Relationship from right side, at the moment i only see option to delete it from Predecessors column (Which we do NOT want to show in GanttGrid), If we can Delete the dependency by Right Click , or Tap and Hold, or by double Click on the Dependency line, if there is another way to delete it than please let us know 
We considered this “deleting predecessor relationship from Gantt Chart” as an feature and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
 
Demo sample: GettingStarted 
 
Regards, 
Vignesh R. 


Loader.
Up arrow icon