Page jumping down to grid on cancelChanges

6 posts, 0 answers
  1. Andy
    Andy avatar
    22 posts
    Member since:
    Feb 2016

    Posted 22 Feb 2016 Link to this post

    Hi,

    When I call the grid's cancelChanges() function, the page will jump so that the top of the grid matches the top of the screen. This blocks out my header area which is located at the top of my page. Is there a way to prevent the screen from shifting on cancelChanges? This happens with refresh() as well.

  2. Magdalena
    Admin
    Magdalena avatar
    487 posts

    Posted 24 Feb 2016 Link to this post

    Hello Andy,

    I am afraid that I am not able to reproduce the issue. Could you please modify this Dojo sample so the issue will be reproduced?

    Regards,
    Magdalena
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Andy
    Andy avatar
    22 posts
    Member since:
    Feb 2016

    Posted 24 Feb 2016 in reply to Magdalena Link to this post

    Hi Magdalena,

    I've fixed the jumping by removing 

    navigatable: true

    from my grid.

    However, I also have an issue with my custom delete popup. If you take a look at the updated Dojo: http://dojo.telerik.com/UJiXa/3,

    please open it in full screen mode, and scroll down to the bottom and delete the bottom entry. The page will jump to the top, and then it will cut off some of the popup because it is not fully scrolled to the bottom. Is there a way to prevent the page from jumping to the top?

  4. Magdalena
    Admin
    Magdalena avatar
    487 posts

    Posted 25 Feb 2016 Link to this post

    Hello Andy,

    You can prevent scrolling the grid after clicking the "Delete" button by the jQuery preventDefault() function. Here is also updated Dojo sample.

    Regards,
    Magdalena
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Andy
    Andy avatar
    22 posts
    Member since:
    Feb 2016

    Posted 25 Feb 2016 in reply to Magdalena Link to this post

    Hi, thanks for your help.

    I would also like to prevent default when the "Update" button is clicked. 

    update: function (e) {
        // need to call preventDefault() on the event here
        editWindow.content(editWindowTemplate(e));
        editWindow.open().center();
        ...
    }

    How can I get a handle to the event in this case? My "Update" function is within my "transport" of "dataSource".

  6. Magdalena
    Admin
    Magdalena avatar
    487 posts

    Posted 26 Feb 2016 Link to this post

    Hi Andy,

    We are afraid that there is no API for prevent default of the Update button.

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