This is a migrated thread and some comments may be shown as answers.

Is there a way to iterate through each group by Resource item?

2 Answers 23 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Veteran
Matthew asked on 19 Apr 2021, 04:51 AM

I would like to set some attributes to each group by item when binding the scheduler with appointments, filtered by some criterion.

My aim is to ultimately access this attribute via the DOM to then do further logic.

E.g.

'VB.Net
schedule.GroupBy = "FoodType"
 
'Other code...
 
Private Sub schedule_ResourceGroupByItemDataBound(sender As Object, e As EventArgs)
  Dim group = e.Item
  group.Attributes.Add("data-foodtypeid", group.Value)
End Sub
// Example case on the client
function schedule_Load(sender, args) {
  $("schedule [data-foodtypeid='1']").hide();
}

 

 

2 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 21 Apr 2021, 02:22 PM

Hello Matthew,

Can you please share what functionality exactly you are after as hiding elements in such a manner can break the appearance of the Scheduler and lead to unexpected behavior?

In the meantime, please check if this demo serves your purpose:

Regards,
Peter Milchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Matthew
Top achievements
Rank 1
Veteran
answered on 22 Apr 2021, 06:55 AM

Hi Milchev, I am rapidly prototyping a workaround to do sub-grouping within the RadScheduler, since multiple grouping is not supported.

I want to be able to add attributes to the resources on the server, so on the client, I can read the attributes and do DOM manipulation.

The .hide() was a poor example, my bad. What I really want to do is append a common ID value for a resource, so when they are loaded on the scheduler, I can do DOM manipulation to move things around after each postback.

Tags
Scheduler
Asked by
Matthew
Top achievements
Rank 1
Veteran
Answers by
Peter Milchev
Telerik team
Matthew
Top achievements
Rank 1
Veteran
Share this question
or