BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Rémi,
Thanks for using Syncfusion Products.
At present there is no built-in support in Gantt to focus specific taskbar item on loading. For this we have already logged a feature request regarding this.
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.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
But currently we can achieve your requirement through workaround at sample level with “Create” client side event, which will focus and scroll the Gantt chart to the today’s taskbar item.
Please refer the following code snippets for more details.
Code snippets:
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"> <ej:Gantt ID="Gantt" runat="server"
//...
Create="create" </ej:Gantt> <script> function create(args) { var proxy = this; var dt = new Date(); var startDate = Globalize.parseDate(args.model.scheduleStartDate, this.model.dateFormat); var result = Math.round((dt - startDate) / (1000 * 60 * 60 * 24)); var left = result * 30; $("#ganttviewerbodyContianerejGanttChart" + this._id).ejScroller("option", "scrollLeft", left); $("#ganttviewerheaderContainerejGanttChart" + this._id).scrollLeft(left); } </script> </asp:Content> |
Please find the sample in the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/119725/ze/SampleFocusTaskbar-1870530348
Please let us know if you have any questions about this.
Regards,
John R
Hi Remi,
For your kind information, at present there is no support to update the scroller at load time for the particular task Id. But we can select any row at load time with the help of “SelectedRowIndex” and focus that particular row in the “Create” client side event. Please refer the below code snippet to achieve this.
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"> <ej:Gantt ID="Gantt" runat="server" AllowColumnResize="true" TaskIdMapping="TaskID" //… Create="create" SelectedRowIndex="11"> </ej:Gantt> <script> function create(args) { var ganttObj = $("#MainContent_Gantt").data("ejGantt"); ganttObj._$treegridHelper.ejTreeGrid("updateScrollBar"); } </script> </asp:Content> |
We have also prepared sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/119725/ze/SampleFocusTaskbar-1740726231
We will consider to achieve any row to be focus at the load time in the feature we have already logged.
Regards,
Mahalakshmi K.