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

RequestEnd Event does not fire at all WHY ???

3 Answers 229 Views
Grid
This is a migrated thread and some comments may be shown as answers.
American Eagle
Top achievements
Rank 1
American Eagle asked on 29 Apr 2013, 05:51 PM
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"))
)
)

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 30 Apr 2013, 03:15 PM
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!
0
Jon
Top achievements
Rank 1
answered on 23 May 2013, 02:59 PM
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?
0
Vladimir Iliev
Telerik team
answered on 24 May 2013, 06:02 AM
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!
Tags
Grid
Asked by
American Eagle
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Jon
Top achievements
Rank 1
Share this question
or