Add an "OK" Button to Client Template of Notification

3 posts, 0 answers
  1. Steven
    Steven avatar
    7 posts
    Member since:
    Aug 2010

    Posted 04 May 2016 Link to this post

    I am attempting to add an "OK" button to the client template of each Notification that will close the focused notification when the user clicks it.  I have reviewed the documentation and I can find how to close ALL notifications but not one's individually via a button within the client template.  Any would greatly appreciate any assistance on how to perform this action.  Thank you!
  2. Steven
    Steven avatar
    7 posts
    Member since:
    Aug 2010

    Posted 05 May 2016 Link to this post

    I think I just needed to walk away from it for a moment or two because I found a really easy step to perform the task I was looking to do.  I am just using a quick jQuery function to close each Notification with an "OK" button: 

    1.$('.okay-btn').click(function () {
    2.    $(this).closest('.k-notification').fadeOut(200, function () {
    3.        $.getJSON('@Url.Action("Snooze", "Notifications")', { id: notifyId, _: $.now() }, function (data) {
    4.            // noop
    5.        });
    6.    });

  3. Dimitar
    Dimitar avatar
    457 posts

    Posted 06 May 2016 Link to this post

    Hi Steven,

    I am glad to know that you have managed to find a solution for this case. Thank you for sharing it with the community.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top