BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Otto,
We would like to let you now that currently we are not having support to change the resource data through setModel. Mean While we can achieve it by using the Gantt Control object model value. Please follow the below code snippet to change the resource data for different project.
<div id="Datasource"> <ul> <li>Project1</li> <li>Project2</li> </ul> </div> @Html.EJ().DropDownList("DataSource").TargetID("Datasource").Width("150px").ClientSideEvents(e => e.Change("projects")) @(Html.EJ().Gantt("Gantt"). //… ) <script type="text/javascript"> var data1, data2, data3, resources1,resources2, resources3; data1=@Html.Raw(Json.Encode(ViewBag.datasource)); data2=@Html.Raw(Json.Encode(ViewBag.datasource1)); resources1=@Html.Raw(Json.Encode(ViewBag.resource)); resources2=@Html.Raw(Json.Encode(ViewBag.resource1)); function projects(args) { var target = $("#Gantt").data("ejGantt"); switch (args.value) { case "Project1": target.model.resources=resources1; target.setModel({dataSource: data1}); break; case "Project2": target.model.resources=resources2; target.setModel({dataSource: data2}); break; } } </script> |
Also we have prepared sample based on this and you can find the sample under the following location.
Sample: http://www.syncfusion.com/downloads/support/forum/119163/ResourceData1195206698.zip
We have also logged a feature request for “support to change resource data via setModel” 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
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.
Hi Otto,
Thanks for your update. Please let us know if you need further assistance.
Regards,
Mahalakshmi K.