Scheduler Item vs. viewItem vs. editItem

2 Answers 25 Views
Scheduler
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 22 Sep 2022, 06:03 AM

Morning team, 

I just recently started using the KendoReact Scheduler widget. Im going through the docs for a second time now and I need a little clarity in the item/viewItem/editItem props. I kind of understand the reason for each one, but I need more clarity on when i should use or extend each one.

The viewitem, seems the easiest, its solely responsible for positioning events in the scheduler, but the item and editItem can both achieve the same results with a little work. My question is when should I be using one over the other? What use cases is each one designed/intended to solve?

The same questions can apply for slot vs editSlot.

Thanks in advance,
Grant

2 Answers, 1 is accepted

Sort by
0
Accepted
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 26 Sep 2022, 07:35 AM

Hi Kiril,

Thanks for the response. Your explanation helps to understand the docs better.

Based on the above then, would I be correct in saying then that the `item` should only be used to display additional data about an event. Like this example, the popup only display info it does not allow editing. If I wanted a popup (for example) that allowed further interaction with the event, I should use the `editItem` like this example. As the <SchedulerEditItem /> provides specific properties to facilitate editing and various ways.

The same would then be true for `slot` and `editSlot`, correct?

Thanks,
Grant

Kiril
Telerik team
commented on 27 Sep 2022, 06:37 AM

Hello Grant,

You are absolutely correct. The `item` is intended for showing additional visual information about the event, while the `editItem` is intended for additional editing elements and/or logic.

The same applies for the `slot` and `editSlot`, while a `viewSlot` is missing, due to its consistent positioning in the DOM.

I hope that helps.

1
Kiril
Telerik team
answered on 23 Sep 2022, 06:23 AM

Hello Grant,

Thank you for reaching out to the KendoReact Support!

I will do my best to provide additional information on when the respective properties of the scheduler could be used.

Starting with the `item` - this property controls the rendering of a single `SchedulerItem` components. Its indented usage is to enable additional visual customization on top of the default styles.

The `viewItems` is pretty much what you've described - its sole purpose is to control the positioning logic.

Moving on to the most-complex one - the `editItem`. In addition to rendering an actual `SchedulerItem`, the `editItem` is also responsible for rendering all of the composing components necessary for the editing functionality of the scheduler.

A nice example would be the `form` property which is exclusive to the `editItem` and enables the user to customize both `Form` of the item (responsible for the editing logic) and the `Editor` (responsible for the individual fields).

Internally we're using all of those components so we decided to give developers the ability to insert their custom logic on all levels of this somewhat-complex structure.

For more information on how the various components are combined, please refer to the `Items Overview` article of the Scheduler.

Please let us know if the provided explanation helps, or if you have any further questions.

 

Regards,
Kiril
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/.

Tags
Scheduler
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Kiril
Telerik team
Share this question
or