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

custom popup editor with customize width not in the center

2 Answers 327 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rooney
Top achievements
Rank 1
rooney asked on 02 Nov 2012, 02:46 AM
Hii all
i making custom popup editor with customize width, so my problem is a window not in center, but widen to right
this my code :
...
editable: { mode: "popup", template: $("#popup_brand").html() },
        edit: function(e) {
            $(e.container).parent().css({
                width: 900
            });
        },

so, how to make that template window into the center.

Thank

2 Answers, 1 is accepted

Sort by
0
NovaStor
Top achievements
Rank 1
answered on 19 Jul 2017, 05:43 AM

Hi rooney,

Did you ever find a solution?

Thank you!

0
Orlin
Telerik team
answered on 21 Jul 2017, 12:15 PM
Hello,

See this dojo for one possible way of resizing the popup editor Window and centering it: http://dojo.telerik.com/AKURE

The Grid's edit event's e.container is a Kendo UI Window element when the Grid is in popup edit mode. After the window is initialized, you can get that Kendo Window instance by using .data('kendoWindow'), then set its width to the desired size using the Window's setOptions method followed by the center method to center the window on the screen.

I hope this helps.

Regards,
Orlin
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
rooney
Top achievements
Rank 1
Answers by
NovaStor
Top achievements
Rank 1
Orlin
Telerik team
Share this question
or