BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Robert,
Thanks for using Syncfusion product.
We have analyzed your query and prepared a sample based on your requirement for updating the new datasource in Gantt control while changing the date in the ejDatePicker control without refreshing the browser.
Please refer the following code snippets for more details.
Code snippets:
<body> @Html.EJ().DatePicker("DatePick").ClientSideEvents(s => s.Close("onClose")) <br /> @(Html.EJ().Gantt("Gantt") //... .Datasource(ViewBag.datasource) ) @(Html.EJ().ScriptManager()) <script type="text/javascript"> var ganttData1=@Html.Raw(Json.Encode(ViewBag.dataSource)), ganttData2=@Html.Raw(Json.Encode(ViewBag.dataSource1)), flag=true; function onClose(args) { var ganttObject = $("#Gantt").data("ejGantt"); if(flag){ ganttObject.setModel({ dataSource: ganttData2 }); flag=false; } else{ ganttObject.setModel({ dataSource: ganttData1 }); flag=true; } } </script> </body> |
Please find the sample in the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/118926/MVCsampleSQL90336456.zip
If this is not your exact requirement, we request you to share more details regarding your queries and revert to us by modifying our sample.
Please let us know if you have any questions about this.
Regards,
John R
@(Html.EJ().DatePicker("startDate")
.Value(Model.Data.StartDate)
.ClientSideEvents(cs=>cs.Change("OnStartDateChanged"))
....
Hi Robert,
Thanks for the update.
Yes, we can also refresh the Gantt data source in the Controller using AJAX post method.
Please let us know if you want further assistance on this.
Regards,
Mahalakshmi K.