We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

API for ResourceGrouping

I am using your schedule control.
And I would like to be able to enable/disable grouping the appointments with an external button like you have here 
Imagine this example but with an external button to switch views between all rooms in one calendar and a caleendar for each room.
Is this possible?

thank you,
Bruno Figueiredo

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team August 7, 2017 06:36 AM UTC

Hi Bruno, 
Thank you for contacting Syncfusion support.We suspect that your requirement is to enable and disable the resource grouping option in Schedule through button actions and for the same we have prepared the sample which can be download from the below location.http://www.syncfusion.com/downloads/support/forum/131950/ze/Sample-943844243<Code>@Html.EJ().ToggleButton("check21").Size(ButtonSize.Normal).ShowRoundedCorner(true).DefaultText("Enable").ActiveText("Diabale").ClientSideEvents(e=>e.Change("onChange"))
function onChange(e) { 
    var roomData =  @Html.Raw(Json.Encode(ViewBag.Rooms)); 
    var ownerData =  @Html.Raw(Json.Encode(ViewBag.Owners)); 
    var grupData=@Html.Raw(Json.Encode(ViewBag.Resources)); 
    if (e.isChecked) { //it will show resource 
            group: { 
                resources: grupData 
            resources: [ 
                field: "RoomId", 
                title: "Room", 
                name: "Rooms", allowMultiple: false, 
                resourceSettings: { 
                    dataSource: roomData, 
                    text: "text", id: "id", groupId: "groupId", color: "color" 
            }, { 
                field: "OwnerId", 
                title: "Owner", 
                name: "Owners", allowMultiple: true, 
                resourceSettings: { 
                    dataSource: ownerData, 
                    text: "text", id: "id", groupId: "groupId", color: "color" 
            appointmentSettings: {                    
                resourceFields: "RoomId,OwnerId" 
    else { // it will hide resource 
            resources: [], // here we are removing the resources to render default schedule control 
            appointmentSettings: {                    
                resourceFields: " " 

Live Chat Icon For mobile
Up arrow icon