Bug - resources are not displayed until date is re-setted

4 posts, 0 answers
  1. Pawel
    Pawel avatar
    22 posts
    Member since:
    Oct 2014

    Posted 10 Nov 2014 Link to this post

    If you group by resources and add resource item to data source, you have to set date in scheduler to display resource item added (scheduler.date(scheduler.date());).

    Demo: http://dojo.telerik.com/eSodi
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1442 posts

    Posted 12 Nov 2014 Link to this post

    Hi Pawel,

    In order to render the new groups the Scheduler should redraw the view. Doing this automatically upon change in the resource's DataSource however, is not supported as it is not always the desired behavior. In case you prefer to render the resource groups automatically, then I would suggest subscribing to the Grid's change event. For example: 
    var rooms = new kendo.data.DataSource({
      change: function(e){
        var scheduler = $("#scheduler").data("kendoScheduler");
        if(scheduler.view()){
         scheduler.view(scheduler.view().name);  
        }
      },
      data: [
        { text: "Small meeting room", value: 1 },
        { text: "Big meeting room", value: 2 }
      ]
    });

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Pawel
    Pawel avatar
    22 posts
    Member since:
    Oct 2014

    Posted 12 Nov 2014 in reply to Alexander Popov Link to this post

    Thanks Alexander. Is `scheduler.view(scheduler.view().name)` more appropriate than `scheduler.date(scheduler.date())`?
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1442 posts

    Posted 12 Nov 2014 Link to this post

    Hi Pawel,

    Both force the Scheduler to redraw the active view, so there should not be any difference.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top