ReadOnly Newest version of ScheduleView

2 posts, 0 answers
  1. Luigi
    Luigi avatar
    3 posts
    Member since:
    Nov 2011

    Posted 14 Nov 2011 Link to this post

    Hi
    We are forming a scheduleView and defining all appointments as readonly.
    we have written the following code to do so:

     

     

    //setting the scheduleView as readonly

     

     

     

    Slot readOnlyslot = new Slot() { IsReadOnly = true };

     

    readOnlyslot.Resources.Add(

     

    new Resource("readOnly"));

     

     

     

    ObservableCollection<Slot> _readOnlySlots = new ObservableCollection<Slot>();

     

    _readOnlySlots.Add(readOnlyslot);

    RadTimeLineView.SpecialSlotsSource = _readOnlySlots;


    this worked great untill we changed the dll`s from version 2011.2.712.40
    to version 2011.2.920.40
    from some reason the readonly behavior is not affective on the new version
    (when we restored the old dll`s, the behavior was back again).
    Any ideas how to solve this for we still want to use the latest Telerik version
    Thanks
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 17 Nov 2011 Link to this post

    Hi Luigi,

    You should also set Start and End time of the Slot and when adding the resource, set also the ResourceType:

    Slot readOnlyslot = new Slot() { Start = DateTime.MinValue, End = DateTime.MaxValue, IsReadOnly = true };
    readOnlyslot.Resources.Add(new Resource("readOnly", "ResourceType"));
    ObservableCollection<Slot> _readOnlySlots = new ObservableCollection<Slot>();
     
    _readOnlySlots.Add(readOnlyslot);
    RadTimeLineView.SpecialSlotsSource = _readOnlySlots;

    Hope this helps.

    Kind regards,
    Yana
    the Telerik team

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

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top