How to resize popup screen with jquary

3 posts, 0 answers
  1. Victor
    Victor avatar
    24 posts
    Member since:
    Feb 2015

    Posted 26 May 2015 Link to this post

    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. Victor
    Victor avatar
    24 posts
    Member since:
    Feb 2015

    Posted 26 May 2015 Link to this post

    $(".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;

    });

  3. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 28 May 2015 Link to this post

    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
Back to Top