Progress Indicator on PopUp Window not displaying

4 posts, 0 answers
  1. Keith
    Keith avatar
    7 posts
    Member since:
    Jan 2016

    Posted 23 May Link to this post

    I have a grid where I have a popup form defined to edit a row.  Everything (finally) is working correctly *EXCEPT* the In-Progress spinner never displays upon submit.

    Grid definition:

    @(Html.Kendo().Grid<BomViewModel>()
            .Name("bom-prGrid-kendoGrid")
            .HtmlAttributes(new {@class = "prGrid"})
            .ClientRowTemplate("")
            .Columns(columns =>
            {
                if (Model.StatusDisplay.Equals("Started")) { columns.Command(cmd => cmd.Edit()).Width(80); }
                columns.Bound(g => g.BomId).Hidden();
                columns.Bound(g => g.IsEditable).Hidden();
                columns.Bound(g => g.Row).Width(75).Title("Row");
                //... Some columns removed for brevity ...//
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Model(model => { model.Id(g => g.BomId); })
                .PageSize(100)
                .Read(r => r.Action("GetCloneAssembly", "AjaxProductReuse").Data("ProductReuseGridReadData"))
                .Update(u => u.Action("UpdateBomItem", "AjaxProductReuse").Type(HttpVerbs.Post).Data("getUpdatedBomRowData"))
                .Events(e => e.Error("ajax_error").Sync("dataSource_sync").Change("dataSource_change"))
            )
            .Events(e => e.DataBound("onDataBound").Edit("onEdit").Save("onSave"))
            .Pageable(pager => pager
                .Input(true)
                .Numeric(true)
                .Info(true)
                .PreviousNext(true)
                .Refresh(true)
                .PageSizes(new int[] {100, 250, 500, 1000})
            )
            .ToolBar(toolbar =>
            {
            toolbar.Template(
                    @<text>
                        <div class="container-fluid otherElements" style="padding-top: 5px; padding-bottom: 5px;">
                            @Html.Partial("_CloneAssembly", Model)
                        </div>
                    </text>);
            })
            .Excel(excel => excel.FileName("ClonableBom.xlsx").Filterable(true).AllPages(true).ProxyURL(Url.Action("ExcelProxy", "AjaxProductReuse")))
            .Sortable()
            .Scrollable()
            .Filterable()
            .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("BOMForm").Window(w => w.Title("Manage BOM Item").Name("BOMForm")))
            .Resizable(resizing => resizing.Columns(true)).Reorderable(reorder => reorder.Columns(true))
            )

    Javascript:

    // Events as defined by the grid's .Event(...) settings...
    function onEdit(e) {
        //Bind deactivate event to the Popup window to support conditional formatting
        e.container.data("kendoWindow").bind("deactivate", function() { conditionalFormattingAll(); });
    }
    function onSave(e) {
        debugger;
        kendo.ui.progress(e.container, true);
    }
    // End events...

    Maybe I misunderstood all the docs, forums and such but the onSave(e) event handler should display a progress gif while the ajax call is in progress.  Am I completely off base here?

     

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 26 May Link to this post

    Hello Keith,

    In the following dojo example you can see that a progress indicator is displayed for a brief moment when it is shown within the "save" event:
    Furthermore, if you use the following demo and attach handler for the "Save" event, the progress indicator is displayed once again correctly:
    Here are the modifications of the above demo:
        .Events(ev=>ev.Save("onSave"))
        ....
     
    <script type="text/javascript">
        function onSave(e) {
            kendo.ui.progress(e.container, true);
        }
         
        ....
     
        //simulating a delay
     [AcceptVerbs(HttpVerbs.Post)] 
     public ActionResult EditingPopup_Update([DataSourceRequest] DataSourceRequest request, ProductViewModel product)  
     
         System.Threading.Thread.Sleep(500);
         ...



    Best Regards,
    Konstantin Dikov
    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Keith
    Keith avatar
    7 posts
    Member since:
    Jan 2016

    Posted 26 May in reply to Konstantin Dikov Link to this post

    Please, please, please - do notice I have that EXACT CODE.  It does not work!  I'm not looking for an example of how to get something else that is not my code working.  I AM LOOKING FOR help with WHY the code does not work as advertised!

    Also, I already responded to your answer and it never showed up here.  Why is that?

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1803 posts

    Posted 30 May Link to this post

    Hello Keith,

    Since the issue seems to be related with your scenario I suggest that we continue the communication in the opened support ticket.


    Regards,
    Konstantin Dikov
    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
UI for ASP.NET MVC is VS 2017 Ready