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

Get current Slot length when on Automatic

2 Answers 32 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Michael Lilly
Top achievements
Rank 1
Michael Lilly asked on 07 Dec 2011, 09:21 PM
I need some way to find what the current slot length is when the MinorTickLength is set to automatic.  When that is set to a value (see your configurator demo), I can get it no problem.  When it's set to automatic, then MinorTickLength is set to null and I have no way to find out what the length of a slot is.

The reason I need this info is when I drag and drop from another control, I need to know how long to make the appointment.  I need to use the slot length to determine that.  Like I said, when it is set using the configurator, it's easy, but I can't seem to find a way to do it otherwise, which is the default state of the control.

I'm really hoping I just overlooked it.  Thanks!

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 12 Dec 2011, 12:16 PM
Hello Michael,

To implement the task I suggest you inherit the ScheduleViewDragDropBehavior class and override its
CanDrop and Drop methods. There you can access the state.SlotDuration property that will return the slot duration.

Regards,
Rosi
Greetings,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Michael Lilly
Top achievements
Rank 1
answered on 12 Dec 2011, 10:32 PM
You know, I was looking for a state type of object, but for some reason it didn't sink in that I could just set the length of the appointment in the CanDrop.

Thanks, that works for me!
Tags
ScheduleView
Asked by
Michael Lilly
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Michael Lilly
Top achievements
Rank 1
Share this question
or