This question is locked. New answers and comments are not allowed.
What is the proper way to set the size of the modal popup window for editing records in a grid? I've tried various fluent configurations without much success. I can indeed make the window resizable but I would like to set the size of the window when it first appears
4 Answers, 1 is accepted
0
Joshua
Top achievements
Rank 1
answered on 15 Oct 2010, 01:09 AM
It's apparently a styling solution via CSS. I've found out how to do it. I set the width attribute on one of the telerik classes. Can't remember the name here at work.
0
Jin
Top achievements
Rank 1
answered on 22 Feb 2011, 04:01 AM
im also stuck with this. can you please post the solution?
0
Henry
Top achievements
Rank 1
answered on 09 Jun 2011, 03:54 AM
@(Html.Telerik().Grid<User>() .Name("Grid") .DataKeys(keys => { keys.Add(u => u.UserId); }) .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.Text).ImageHtmlAttributes(new {style="margin-left:0"})) .DataBinding(dataBinding => dataBinding.Ajax() .Select("_SelectEditableUsers", "Account") .Insert("_InsertEditableUser", "Account") .Update("_UpdateEditableUser", "Account") .Delete("_DeleteEditableUser", "Account") ) .Columns(columns => { columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); commands.Delete().ButtonType(GridButtonType.Image); }).Width(100).Title("Commands"); columns.Bound(u => u.LogOnName).Width(150); columns.Bound(u => u.UserName).Width(200); columns.Bound(u => u.UserDesc).Width(200); columns.Bound(r => r.IsLocked).ClientTemplate("<input type='checkbox' disabled='disabled' name='IsLocked' <#= IsLocked? checked='checked' : '' #> />"); columns.Bound(r => r.IsAvailable).ClientTemplate("<input type='checkbox' disabled='disabled' name='IsAvailable' <#= IsAvailable? checked='checked' : '' #> />"); }) .Editable(editing => editing.Mode(GridEditMode.PopUp).Window(w=>w.Resizable(r=>r.Enabled(true)).Width(600).Height(400)).DefaultDataItem(new User() { IsAvailable = true })) .Pageable(paging => paging.Style(GridPagerStyles.PageInput | GridPagerStyles.Numeric | GridPagerStyles.NextPrevious)) .Resizable(resizing => resizing.Columns(true)) .Reorderable(reorder => reorder.Columns(true)) .Pageable() .Sortable() .Scrollable())
unfortunately, the window's height and width setting are both not working, I wonder if it is a bug.
I'm using MVC extension 2011 Q1 5170
Vu
Top achievements
Rank 1
answered on 30 Jul 2011, 03:39 PM
We got frustrated with that for time, now figure out the way to set the pop-up in CSS with Q2.2011 version. Looking into ClientRowTemplate.aspx (new one in Q2 version), find the CSS property below
Cheers,
Thanks,
ToTo
/* in-form editing */ .t-edit-form-container { width: 550px; margin: 1em; }This is the one we are finding now.
Cheers,
Thanks,
ToTo