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

Grid Popup Edit Template Button Div Width

5 Answers 280 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 26 Jan 2019, 02:18 PM

I have an issue where the DIV on the bottom of the edit templates is not filling the width of the window.  Please see attached.

I have added the following .css which seems to control it but if the width is set to "auto" or "100%" it looks like the attachment.  If I change to to a specific pixel width it sizes but as I remember this should not need to be manually handled.

<style>
   div.k-edit-buttons.k-state-default{
     /*width:560px;*/
     width:100%;
    }
</style>

 

The grid does have the height and width set in the column declarations

.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Template").Window(x => x.Width(600).Height(500)))

 

Please advise

 

5 Answers, 1 is accepted

Sort by
0
Reid
Top achievements
Rank 2
answered on 27 Jan 2019, 01:35 PM

I forgot to actually attach the screen shot to the last post.

Here it is.

0
Accepted
Viktor Tachev
Telerik team
answered on 30 Jan 2019, 02:44 PM
Hello Reid,

For making the edit form to stretch to the entire width of the popup window you can use the CSS below:

.k-edit-form-container {
    width: auto;
}

Give it a try and let me know how it works for you.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 31 Jan 2019, 01:40 PM

Hi Viktor,

That solves it.  Thank you for that.

Question though, why do we have to add that style?  Should it not be default?
For instance if you look at this demo page that section is sized correctly but there is no explicit style that you mentioned above.
Grid / Popup editing

0
Viktor Tachev
Telerik team
answered on 05 Feb 2019, 08:24 AM
Hi Reid,

In the example the default width is used by the popup window and there is no need to adjust the width of the edit form container. However, if the width of the popup is changed the additional CSS will also be required. Check out the dojo sample below for reference:



Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 05 Feb 2019, 01:33 PM
Thank you for clarifying that.  I will remember that in the future.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Reid
Top achievements
Rank 2
Viktor Tachev
Telerik team
Share this question
or