Hi Desfero,
Thank you for using Syncfusion products.
Since the resourceSettings.dataSource value is provided with one-way data binding support, therefore it is not possible to load the resourceSettings dataSource values through ajax post in angular sample. Therefore, we have prepared a schedule angular sample with ajax post to bind the whole resource data through setmodel, which can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/119670/ze/ScheduleSample-935388532
Kindly have a look at the sample and please let us know, if you need any further assistance on this.
Regards,
Sarath Kumar P K
Hi Desfero,
Thanks for your update.
We have analyzed your requirement to interchange the resources order from [“Rooms”, ”Owners”] to [“Owners”, ”Rooms”] and would like to let you know that it can be done by changing the order of resource object details in the resources collection. The values that we usually provide in the group property is only for specifying the levels/groups of the multiple resources to render on the Schedule control. Therefore, if you need to interchange the levels, we request you to change the resources data collection in the post action.
Please refer the following code snippet to interchange the group and resources.
<code>
public JsonResult About()
{
rooms.Add(new Rooms { text = "ROOM1", id = "1", groupId = "1",color = "#cb6bb2" });
rooms.Add(new Rooms { text = "ROOM2", id = "2",groupId = "1", color = "#56ca85" });
owner.Add(new Rooms { text = "Nancy", id = "1", groupId = "1", color = "#ffaa00" });
owner.Add(new Rooms { text = "Steven", id = "3", groupId = "2", color = "#f8a398" });
owner.Add(new Rooms { text = "Michael", id = "5", groupId = "1", color = "#7499e1" });
resSettings.Add(new ResourceSettings { dataSource = rooms, text = "text", id = "id", groupId = "groupId", color = "color" });
resSettings.Add(new ResourceSettings { dataSource = owner, text = "text", id = "id", groupId = "groupId", color = "color" });
//Interchange group and resource
resource.Add(new Resource { field = "ownerId", title = "Owner", name = "Owners", allowMultiple = true, resourceSettings = resSettings[1] });
resource.Add(new Resource { field = "roomId", title = "Room", name = "Rooms", allowMultiple = false, resourceSettings = resSettings[0] });
return Json(resource, JsonRequestBehavior.AllowGet);
}
</code>
We have modified the sample based on your requirement to interchange the group and resources, which can be downloaded from the following location
http://www.syncfusion.com/downloads/support/forum/119670/ze/Schedule-747619550
Kindly try the above sample and let us know if you need any further assistance on this.
Regards,
Sarath Kumar P K