Remove and put the Resource Grouping

Using MonthAgenda view:

<ScheduleGroup Resources="@GroupData" EnableCompactView="false"></ScheduleGroup>

<ScheduleResources>

<ScheduleResource TItem="AirlinesData" TValue="int[]" DataSource="@ResourceData" Field="AirlineId" Title="Airline Name" Name="Airlines" TextField="AirlineName" IdField="AirlineId" ColorField="AirlineColor" AllowMultiple="true"></ScheduleResource>

</ScheduleResources>

I want to remove and put the resource grouping of the data.

If the list of appointments has data, and the list of resources (ResourceData) has data, it works fine:


If the list of appointments has data, and the list of resources (ResourceData) has no data, it does not work:


With the day and week views it works in both cases.




8 Replies

SK Satheesh Kumar Balasubramanian Syncfusion Team March 22, 2022 12:14 PM UTC

Hi Gerardo, 
  
We let you know that if the resource data is empty, you have to remove the resource related snippet to resolve the issue. 

  
Index.razor: 
<SfSchedule TValue="AppointmentData" Width="100%" Height="650px" @bind-CurrentView="CurrentView" @bind-SelectedDate="@CurrentDate"> 
    @if (ResourceData != null) 
    { 
        <ScheduleGroup EnableCompactView="false" Resources="@groupData"></ScheduleGroup> 
        <ScheduleResources> 
            <ScheduleResource TItem="AirlinesData" TValue="int[]" DataSource="@ResourceData" Field="AirlineId" Title="Airline Name" Name="Airlines" TextField="AirlineName" IdField="AirlineId" ColorField="AirlineColor" AllowMultiple="true"></ScheduleResource> 
        </ScheduleResources> 
    } 
</SfSchedule> 
  
Could you please check the above sample and confirm whether the above solution resolves the problem at your end? 
  
Regards, 
Satheesh Kumar B 




GL Gerardo Lopez Ruiz March 22, 2022 06:29 PM UTC

I need remove and put the resource grouping of the scheduler, in the example, it does not use the resource grouping. ResourceData is alwais null.



GL Gerardo Lopez Ruiz March 22, 2022 09:53 PM UTC

In this example, if you change the version of the control to the latest, don't work and If you don't change it, it works.


https://www.syncfusion.com/downloads/support/directtrac/general/ze/ScheduleComponent-1231060299



SK Satheesh Kumar Balasubramanian Syncfusion Team March 24, 2022 12:58 PM UTC

Hi Gerardo, 
  
You can use the Resources data as null instead of new string[] {  } to resolve the reported issue. 
  
  
Index.razor:  
    public void ChangeResourceGroup() 
    { 
        if(Content == "Click to UnGroup") 
        { 
            Resources = null; 
            Content = "Click to Group"; 
        } 
        else 
        { 
            Resources = new string[] { "Owners" }; 
            Content = "Click to UnGroup"; 
        } 
        StateHasChanged(); 
    }

 
  
Could you please check the above sample and confirm whether the above solution resolves the problem at your end?  
   
Regards,  
Satheesh Kumar B 



GL Gerardo Lopez Ruiz March 24, 2022 08:24 PM UTC

Now yes, solved. Thank you very much!!



GL Gerardo Lopez Ruiz March 24, 2022 11:59 PM UTC

While testing I have detected an error:


Click Agenda:


Click Click to UnGroup


Click Week


Click Group 


Click  Click to UnGroup....and error:




VM Vengatesh Maniraj Syncfusion Team replied to Gerardo Lopez Ruiz March 28, 2022 01:37 PM UTC

Hi Gerardo,


Sorry for the inconvenience.

We checked the reported problem and considered this as a defect at our end. The fix for this issue will be included in our weekly patch release which is expected to be rolled in the 2nd week of April.


https://www.syncfusion.com/feedback/33736/index-out-of-range-exception-when-ungrouping-dynamically-in-week-view


Regards,

Vengatesh



VM Vengatesh Maniraj Syncfusion Team April 18, 2022 07:42 AM UTC

Hi Gerardo,


Thanks for being patience.


We are glad to announce that our weekly patch release v20.1.48 has been rolled out successfully. In this release, an issue with “Exception is thrown while remove grouping dynamically in vertical views” has been fixed. As a result, we recommend you upgrade to the latest version of our Syncfusion package to avail of those changes.


Release Notes: https://blazor.syncfusion.com/documentation/release-notes/20.1.48?type=all#scheduler


Kindly check the reported defect in the latest version and get back to us if you need any further assistance.


Regards,

Vengatesh


Loader.
Up arrow icon