This question is locked. New answers and comments are not allowed.
Hi,
My popup window is positioned slightly to the right of the center of the screen which I don't like.
I have removed all custom css files to see if there was anything I have done, but still the same.
I want the window to be at the center of the screen. Is there a way to manually position the window?
Regards,
Mattias
My popup window is positioned slightly to the right of the center of the screen which I don't like.
I have removed all custom css files to see if there was anything I have done, but still the same.
I want the window to be at the center of the screen. Is there a way to manually position the window?
@{Html.Telerik().Grid(Model.Items) .Name("Grid") .DataKeys(keys => keys.Add(x => x.ID)) .ToolBar(commands => commands.Insert()) .EnableCustomBinding(true) .PrefixUrlParameters(false) .DataBinding(dataBinding => { dataBinding.Server() .Select("Index", "Menu") .Insert("Insert", "Menu") .Update("Update", "Menu") .Delete("Delete", "Menu"); }) .Editable(editing => editing.Mode(GridEditMode.PopUp)) .Columns(columns => { columns.Bound(x => x.Name).Title(Resources.Application.MenuName); columns.Bound(x => x.Url).Title(Resources.Application.Url); columns.Bound(x => x.IsEnabled).Title(Resources.Application.IsEnabled); columns.Bound(x => x.CreateDate).Title(Resources.Shared.CreateDate).Format("{0:g}") .HeaderHtmlAttributes(new { @class = "right" }) .HtmlAttributes(new { @class = "right" }); columns.Command(commands => { commands.Edit(); commands.Delete(); }).Width(200).Title("").HtmlAttributes(new { @class = "right" }); }) .Render(); }Regards,
Mattias
9 Answers, 1 is accepted
0
Hello Mattias,
Atanas Korchev
the Telerik team
By default the popup is centered in the grid. You can center it in the browser window by following the approach from the "Center PopUp Edit Form" code library project.
Best wishes,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Mattias
Top achievements
Rank 1
answered on 29 Apr 2011, 08:37 AM
Hi Atanas,
Center it in the grid is just fine, the problem is still the same, my popup isn't centered to the grid!
When looking again it seems the popup is styled with fixed position of the browser. If I resize the browser the popup is still on the same position.
Center it in the grid is just fine, the problem is still the same, my popup isn't centered to the grid!
When looking again it seems the popup is styled with fixed position of the browser. If I resize the browser the popup is still on the same position.
0
Mattias
Top achievements
Rank 1
answered on 29 Apr 2011, 08:43 AM
Hi again,
I think I found the problem!
It must be the editor in the popup the causes it. If I set the width of the window to for example 700 pixels, the window is centered.
Bug or a "feature"? :)
I think I found the problem!
It must be the editor in the popup the causes it. If I set the width of the window to for example 700 pixels, the window is centered.
Bug or a "feature"? :)
0
Hi Mattias,
Atanas Korchev
the Telerik team
I don't think I understand the problem. Could you clarify?
All the best,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Alexander
Top achievements
Rank 1
answered on 20 Jun 2011, 09:16 PM
the example above works fine for edit, bu how can i center the form for "add new"?
Thanks,
Alex
Thanks,
Alex
0
Hi Alexander,
Atanas Korchev
the Telerik team
The same code will work with adding new records because the OnEdit event is raised in that case too.
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Srikanth
Top achievements
Rank 1
answered on 04 Dec 2011, 06:43 PM
hiiii,
Mattias
iam beginner of asp.net the way u designed ur page is simply superb can u plas share ur code with me it will be helpfull for me to learn iam using C# as the domain in ASP.net..... pls do share ur code of both design and logic.... if u can....
THANKS IN ADVANCE
MY MAIL ID IS: sri.reddy276@gmail.com
Mattias
iam beginner of asp.net the way u designed ur page is simply superb can u plas share ur code with me it will be helpfull for me to learn iam using C# as the domain in ASP.net..... pls do share ur code of both design and logic.... if u can....
THANKS IN ADVANCE
MY MAIL ID IS: sri.reddy276@gmail.com
0
jfkrueger
Top achievements
Rank 1
answered on 21 Jun 2012, 09:06 PM
How do you set the width of the popup window?? My popup window also is not even close to being centered over the grid. It is basically just hugging the right side of the screen and sometimes even goes off the screen. I do have three editors in my editor template.
Thanks!
Thanks!
0
jfkrueger
Top achievements
Rank 1
answered on 21 Jun 2012, 09:17 PM
Followup: It does look like it has something to do with the editors in the grid because if I set the width of the editors in the shared editor template it is much closer to being centered and not always hugging the right-hand side of the screen. This in combination with the link on centering the window solved my issue.