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

Position of Window called from a Grid

2 Answers 379 Views
Window
This is a migrated thread and some comments may be shown as answers.
Heather
Top achievements
Rank 1
Heather asked on 24 Sep 2012, 06:10 PM

From the other posts out here, I see that window positioning can be tricky.  I am hoping someone can help me solve my issue.  I have a page which has two grids on it.  The page is "long" enough to generate scroll bars. Each grid has a column with custom buttons.  Those buttons open one of two windows.  However, as they are called from the grids, Kendo tries to place the windows on top of the grids.  That would be fine, but upon drawing of the window(s), the page scrolls up to the top automatically. The window(s) are further down the page and not visible.  I would like a way to either suppress the top-scrolling behavior or place my windows at the top of the page when drawn.  Any help is appreciated.  Snippets below.

 

$("#grid").delegate(".showExtendWindow", "click", function (e) {
extendAccessWindow.data("kendoWindow").center();
extendAccessWindow.data("kendoWindow").open();
});

$("#grid2").delegate(".showExtendWindow2", "click", function (e) {
extendContractWindow.data("kendoWindow").center();
extendContractWindow.data("kendoWindow").open();
});

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 03 Nov 2016, 06:39 PM
Dealing with the same thing. In this case, the powers that be chose to use the kendo.window as a "popover". Of course, the positioning is very unstable. Kendo doesn't make it very easy to use these windows in a relative manner. Personally, I am not sure why they havent fixed this. The only popover control they offer is for mobile. I dont want to add mobile just to use one control. Nor do I want to pick the terd from the brownies on pulling in only one control from a library I dont need.  No other control that gets appended to the body, that I'm aware of, like the window object. It doesnt get trapped in the overflow of the grid calling it either which was a selling point for this app. Getting these windows to be (a) dynamic and (b) relative is quite the problem. Surprised no one has replied to this. Again, just make the damn window a general control that can be anything. If youre going to allow it to be a modal, a window, an iframe, etc. then why cant it be a POPOVER? With relative positioning built in?
0
Ianko
Telerik team
answered on 08 Nov 2016, 09:14 AM

Hello David,

 

From the information tagged to the ticket I see that you are the 2012.2.913 version, which is quite an old one. Through the years and Kendo UI releases, Kendo Window has been improved and fixes according to positioning, size and so one has been included. Thus, I suggest you re-testing the situations you are after with a more recent version. 

 

On a side note, you can do that in a simple dojo (http://dojo.telerik.com/), which support recent versions of Kendo UI. Plus, this way you will be able to build up a sample and show what your is the difficulty you have with the Kendo UI widgets. 

 

As for popover functionality, Kendo Window is a lot more than just a popover component and provides much more complexity in terms of functionality and UI. Therefore, it could be challenging to use it in such a basic situation. Have you considered using the Kendo Popup widget instead? It will enable you to create a very simple popup, position it easily and show it relative to whatever element you need to.

 

Regards,
Ianko
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Window
Asked by
Heather
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or