Kendo Scheduler - Unselect a selected event programatically

6 posts, 1 answers
  1. Lloyd
    Lloyd avatar
    11 posts
    Member since:
    Mar 2016

    Posted 31 Mar 2016 Link to this post

    How do I unselect a selected event programmatically? I tried to call the select() method with an empty array input but it doesn't seem to unselect the events. Further, I see that the change event is invoked only once as opposed to twice in the Chrome console window.

    Please see the below code snippet for an example.

    http://dojo.telerik.com/Exiyo

    Thanks in advance.

     

     

  2. Lloyd
    Lloyd avatar
    11 posts
    Member since:
    Mar 2016

    Posted 03 Apr 2016 Link to this post

    This functionality is really critical for our application. Are there any updates or suggestions for this issue?

     

  3. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 04 Apr 2016 Link to this post

    Hello Lloyd,

    You can clear the selection passing 'null' to the select method: Let me know if this does not help.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  4. Lloyd
    Lloyd avatar
    11 posts
    Member since:
    Mar 2016

    Posted 04 Apr 2016 in reply to Georgi Krustev Link to this post

    It works now! Thank you!
  5. K.Ramadan
    K.Ramadan avatar
    81 posts
    Member since:
    Feb 2020

    Posted 29 Jul 2020 in reply to Georgi Krustev Link to this post

    Hi there,

    I know I am a bit late, but passing the value null to the Method select(), it is working only when I trigger this in the Scheduler_Navigation Function. But what I am trying to do, is to trigger the select() Method after Canceling the Editor.

     

    So this is what I did in the Scheduler_Cancel Function AND in the Scheduler_Navigation Function :

     

    var scheduler = $("#schedulerEvent").data("kendoScheduler");
    scheduler.select(null);

     

    It's deselecting the Selected Slots only when i navigate, but when i cancel the Editor, it is just changing the selected Slots from more than one Slot to the FIRST SLOT ON THE LEFT SIDE

  6. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2184 posts

    Posted 30 Jul 2020 Link to this post

    Hello,

    Indeed in this scenario the Scheduler selects the first slot in the view. You can remove the k-state-selected class from the slot with jQuery:

    scheduler.select(null);
    setTimeout(function() {
      $('.k-scheduler-content td.k-state-selected').removeClass('k-state-selected');
    }, 0);

    Regards,
    Ivan Danchev
    Progress Telerik

Back to Top