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

How to resize popup screen with jquary

2 Answers 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 26 May 2015, 04:49 PM

When a row double click a edit form pops up and re-sizes but when add new record button is click the form is not re-sizes. 

This only works when edit button is clicked:

                $("#grid tbody").on("dblclick", "tr", function () {
                    var grid = $("#grid").data('kendoGrid');
                    grid.editRow(this);                    
                    $(".k-edit-form-container").parent().width(1200).data("kendoWindow").center();                    
                    $(".k-edit-buttons").parent().width(1200).data("kendoWindow");                    
                });

 

how can I use this code to re-size the form when both buttons are clicked?

2 Answers, 1 is accepted

Sort by
0
Victor
Top achievements
Rank 1
answered on 26 May 2015, 08:41 PM

$(".k-button.k-button-icontext.k-grid-add").click(function () {
          var grid = $("#grid").data('kendoGrid');
          grid.addRow(this);
          $(".k-edit-form-container").parent().width(1200).data("kendoWindow").center();
          $(".k-edit-buttons").parent().width(1200).data("kendoWindow");
          return false;

});

0
Boyan Dimitrov
Telerik team
answered on 28 May 2015, 02:42 PM

Hello Victor,

In case of using Kendo UI Grid for ASP.NET MVC there is an easy and convenient way of making the window resizeable shown below:

.Editable(editable => editable.Mode(GridEditMode.PopUp).Window(w=> w.Resizable()))

Other option is to use the Kendo Grid edit event and access the window widget using the e.container element. 

Regards,
Boyan Dimitrov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Ramesh
Top achievements
Rank 1
commented on 04 Mar 2022, 11:36 PM

Hi Boyman,

How to disable window resize option for custom popup. For me its resizing without putting any attributes on.

 

Thanks,

Ramesh

 

Yanislav
Telerik team
commented on 08 Mar 2022, 01:14 PM

Hello Ramesh, 

In order to disable the resizing option of the Pop-up editor window, I recommend you to use the following configuration :

.Editable(editable => editable.Mode(GridEditMode.PopUp).Window(w => w.Resizable(s => s.Enabled(false))))

Note that, by default, the window should not be resizable. So I recommend you review the code for a snippet that may override the default behavior.

I hope this helps! 

Tags
Grid
Asked by
Victor
Top achievements
Rank 1
Answers by
Victor
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or