Scheduler - Grouping of Resources

4 Answers 137 Views
Scheduler wrapper
VB
Top achievements
Rank 1
Veteran
Iron
VB asked on 28 Apr 2021, 05:14 AM

Hello,

I have a problem with the grouping of scheduler. Now, I'm grouping the data with local ressource.

I would like to group the data with remote ressource but it doesn't work, although the format of the remote ressource array is the same as the local ressource.

Here an example of the local ressource which works : 

<kendo-scheduler

[...]

:group="resources:['Canaux']}" >

<kendo-scheduler-resource :field="'canalId'" :name="'Canaux'" :data-source="arrayCanaux" ></kendo-scheduler-resource>

</kendo-scheduler>

let arrayCanaux = [];
for (let i = 0; i < 15; i++) {
  arrayCanaux[i] = { text: "A-" + i + "", value: i };
}

And here the code with remote resource : 

axios.get('....').then(response => {

let res = responses.data.canaux

this.arrayCanaux = res.map(canal =>{ return ({ text: canal.nom, value: canal.canalId }) }) console.log(this.arrayCanaux); })


The combobox that I use works perfectly when I fill it with the arrayCanaux with remote ressource but when I want to use it for the grouping of scheduler it doesn't work.

I found this documentation I think it is a solution to my problem but is there a solution that looks like mine?

Thanks

4 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 06 May 2021, 06:10 AM

Hi,

One possible solution for this issue is to re-render the dataSource of the resources and the view of the Kendo Scheduler widget once the data have returned from the server. Here is a stackblitz example where a similar behavior is implemented with a dummy setTimeout instead of a server call - https://stackblitz.com/edit/r6ycp2-dfhm35?file=src/main.vue

If you have further questions please let me know.

Regards,
Plamen
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

0
Petar
Telerik team
answered on 29 Apr 2021, 02:04 PM

Hello VB,

The requested functionality is not a standard one for the Scheduler component. Talking in general, the linked serverGrouping configuration of the DataSource should be what you are searching for but I can't confirm that this configuration will work with the Scheduler. 

Can you provide more details about your scenario? Does it really need to have the grouping of the Scheduler's events server-side?

Regards,
Petar
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

0
VB
Top achievements
Rank 1
Veteran
Iron
answered on 03 May 2021, 10:18 AM

Hi Petar,

After some test, the serverGrouping doesn't work as I want. it seems it takes a field but I need it takes a separate object.

I need server-side grouping because  the data of grouping is also used by another app. So get a unique data is easier than change data in both app.

thanks

0
VB
Top achievements
Rank 1
Veteran
Iron
answered on 06 May 2021, 09:40 AM

Thanks Plamen, it works perfectly.

I have think to a re render but I i wasn't doing it in the right way. Now all is good.

Tags
Scheduler wrapper
Asked by
VB
Top achievements
Rank 1
Veteran
Iron
Answers by
Plamen
Telerik team
Petar
Telerik team
VB
Top achievements
Rank 1
Veteran
Iron
Share this question
or