RequestEnd Event does not fire at all WHY ???

4 posts, 0 answers
  1. American Eagle
    American Eagle avatar
    2 posts
    Member since:
    Feb 2009

    Posted 29 Apr 2013 Link to this post

    Please reply to: v-daughw-oxf@ae.com

    I cannot get the requestEnd event to fire at all with Kendo MVC build 2013.1.319.340 . WHY???????

    < script>

    //can't get this to fire to display success/fail msg
    function onRequestEnd(e) {

    debugger

    //Check request type
    if (e.type == "create" || e.type == "update") {
    //check for errors in the response
    if (e.response == null || e.response.Errors == null) {
    $('#PivotGrid').data().kendoGrid.dataSource.read();
    alert("Update Successful");
    }
    else {
    alert("Update Failed");
    }
    }
    }






    < /script>


    < div align="center">

    @(Html.Kendo().Grid<PivotRow>()
    .Name("PivotGrid")
    .HtmlAttributes(new { align = "center", style = "height:600px; width:75%" })
    .Scrollable()
    .Sortable()
    .Navigatable()
    .Columns(columns =>
    {
    columns.Bound(c => c.us_price).Width(90).Title("US Price");
    columns.Bound(c => c.us_base_pricepoint).Width(90).Title("US Base Price").Hidden();
    columns.Bound(c => c.canada_price).Width(90).Title("Canada Price");
    columns.Bound(c => c.mexico_price).Width(90).Title("Mexico Price");
    columns.Bound(c => c.what_system).Width(100).Title("What System").Hidden();
    //columns.Bound(c => c.what_system).Width(90).EditorTemplateName("_DDL_BM");
    columns.Command(command => command.Destroy()).Width(50);

    })
    .Editable(editing => editing.Mode(GridEditMode.InCell))
    // Command configuration
    .ToolBar(toolbar =>
    {
    toolbar.Create();
    toolbar.Save();
    })
    .Events(e => e.SaveChanges("saveChanges"))
    .DataSource(dataSource => dataSource
    .Ajax()
    .Batch(true)
    // Specify property that is the unique identifier of the model
    .Model(model => model.Id(c => c.us_base_pricepoint))
    .Model(model =>
    {
    model.Field(c => c.what_system).DefaultValue("BM");
    })
    .Events(events =>
    {
    events.RequestEnd("onRequestEnd"); //can't get this to fire!
    events.Error("error");
    })
    .Create(create => create.Action("PricePoint_Create", "AE_IB_LOOKUP_VAL"))
    .Read(read => read.Action("PricePoint_Read", "AE_IB_LOOKUP_VAL"))
    .Update(update => update.Action("PricePoint_Update", "AE_IB_LOOKUP_VAL"))
    .Destroy(destroy => destroy.Action("PricePoint_Destroy", "AE_IB_LOOKUP_VAL"))
    )
    )
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 30 Apr 2013 Link to this post

    Hi Edsel,

     
    I tried to reproduce the problem locally but to no avail – everything is working as expected on our side. Could you please provide runable project where the issue is reproduced? This would help us pinpoint the exact reason for this behavior.

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Jon
    Jon avatar
    4 posts
    Member since:
    Sep 2012

    Posted 23 May 2013 Link to this post

    I have the same issue, HOWEVER, I have noticed that this is a problem only on grids that are editable.  Non editable grids, the event fires, editable grids, not so much.  Any thoughts?
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 24 May 2013 Link to this post

    Hi Jon,

     
    From the provided information it's not clear for us what is the exact reason for this behavior and I would suggest to open a new support thread with more information about your current grid setup. That way we will be able to help you straight away.

    Kind Regards,
    Vladimir Iliev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top