This is a migrated thread and some comments may be shown as answers.

Page jumping down to grid on cancelChanges

5 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 22 Feb 2016, 02:57 PM

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.

5 Answers, 1 is accepted

Sort by
0
Magdalena
Telerik team
answered on 24 Feb 2016, 08:51 AM
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!
 
0
Andy
Top achievements
Rank 1
answered on 24 Feb 2016, 04:08 PM

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?

0
Magdalena
Telerik team
answered on 25 Feb 2016, 08:54 AM
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!
 
0
Andy
Top achievements
Rank 1
answered on 25 Feb 2016, 03:30 PM

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".

0
Magdalena
Telerik team
answered on 26 Feb 2016, 09:12 AM
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!
 
Tags
Grid
Asked by
Andy
Top achievements
Rank 1
Answers by
Magdalena
Telerik team
Andy
Top achievements
Rank 1
Share this question
or