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

control over popup template

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 09 Jan 2013, 10:55 AM
Can i have a control over how it looks and where to show it the popup template generated by default?
i noticed that without any cshtml file,automatically show a view with all the fields from the viewModel somewhere at the bottom,and maybe i want to show in the center of the screen,and the controls be with some width and some color.
Also,In case of a custom template(view) how do i use it with the grid in the popup mode ?
Thanks in advance,

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 11 Jan 2013, 09:13 AM
Hi Daniel,

 
You can use the Edit event of the Grid to get the current PopUp window and change it's options, style or just center it. For example:

Define Edit event handler:

.Events(e => e.Edit("onEdit"))

onEdit function:
function onEdit(e) {
    //Get current Window
    currentWindow = $("[data-role=window]").data("kendoWindow");
    // Change options using setOptions method
    currentWindow.setOptions({
        width: 900,
        title: "Custom PopUp Title"
    });
    //Center the window
    currentWindow.center();
}

Also you can check the Grid Custom PopUp editor code library for more information how to set-up custom PopUp editor.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or