BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
I know there is no feature of reading event markers from external data. While suggesting you this feature, I would like to get some clue about how to turn a list with Day, Label, CssClass to the gantt event markers tags. For example, turn this list:
List<MarkerData> Markers = new List<MarkerData>(){new MarkerData(){ Day = new DateTime(2025,01,30), Label =
"Testing", CssClass =
"e-custom-event-marker" },
new MarkerData(){ Day = new DateTime(2025,02,01), Label = "Testing2", CssClass =
"e-custom-event-marker" }
}
to these tags programmatically:
<GanttEventMarkers>
<GanttEventMarker Day="new DateTime(2025,01,30)" Label="Testing" CssClass="e-custom-event-marker">
</GanttEventMarker>
<GanttEventMarker Day="new DateTime(2025,02,01)" Label="Testing2" CssClass="e-custom-event-marker">
</GanttEventMarker>
</GanttEventMarkers>
I guess the dynamic codes can be created by jQuery? Or is there a more preferred solution?
Hi Desmond,
Greetings from Syncfusion Support,
To achieve your requirement, we suggest using the EventMarkers
property in the Gantt chart. This property allows you to pass a collection of
event markers to the Gantt chart. We have attached a code snippet and sample
for your reference:
<SfGantt EventMarkers="ganttEventMarkers"> … </SfGantt> {
new
GanttEventMarker { Day = new DateTime(2021, 04, 09), Label = "Research phase", CssClass = "e-custom-event-marker"
}, }; |
Sample link: https://blazorplayground.syncfusion.com/embed/rXhoZLteVNcQwjcX?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5
For more information, you may refer to the following link:
https://blazor.syncfusion.com/documentation/gantt-chart/event-markers
https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.SfGantt-1.html#Syncfusion_Blazor_Gantt_SfGantt_1_EventMarkers
If you have any further questions or need additional assistance, please
let me know!
Regards,
Ajithkumar G
Thanks a lot for the quick reply that solved the question. I discovered another problem, which I will ask in another thread.
Hi Desmond,
We're glad we could assist you in resolving your initial query and are happy to help with your new concern in the other thread. For now, we are marking this forum as solved.
Regards,
Shereen