Get current Slot length when on Automatic

3 posts, 1 answers
  1. Michael Lilly
    Michael Lilly avatar
    53 posts
    Member since:
    Apr 2010

    Posted 07 Dec 2011 Link to this post

    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. Answer
    Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 12 Dec 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Michael Lilly
    Michael Lilly avatar
    53 posts
    Member since:
    Apr 2010

    Posted 12 Dec 2011 Link to this post

    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!
Back to Top