Hello,
How can I force the grid to refresh after saving an edit using your pop-up editor?
After a user saves a new or edited record, its data is encrypted and passed to the database. When we return to the grid, the new records data is displayed in its encrypted form, but the other records display properly. After I hit the refresh button on the grid, everything displays properly. This is the issue that I am trying to correct.
I would appreciate your help and suggestions,
Mike
How can I force the grid to refresh after saving an edit using your pop-up editor?
After a user saves a new or edited record, its data is encrypted and passed to the database. When we return to the grid, the new records data is displayed in its encrypted form, but the other records display properly. After I hit the refresh button on the grid, everything displays properly. This is the issue that I am trying to correct.
I would appreciate your help and suggestions,
Mike
5 Answers, 1 is accepted
0
Hello Mike,
I am not sure why exactly the new record is displayed in encrypted form, however you could rebind your grid with the help of the requestEnd event of the dataSource.
e.g.
Please notice the requestEnd event is only available in the latest internal build - it will be introduced in the next official release.
Also do not hesitate to send a sample project which replicates the encrypting issue you experience so we can search for some other solution.
Kind regards,
Petur Subev
the Telerik team
I am not sure why exactly the new record is displayed in encrypted form, however you could rebind your grid with the help of the requestEnd event of the dataSource.
e.g.
function
onGridDataSourceRequestEnd(e){
if
(e.type==
"update"
)
{
this
.read();
}
}
Please notice the requestEnd event is only available in the latest internal build - it will be introduced in the next official release.
Also do not hesitate to send a sample project which replicates the encrypting issue you experience so we can search for some other solution.
Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
American Eagle
Top achievements
Rank 1
answered on 29 Apr 2013, 05:46 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"))
)
)
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"))
)
)
0
Hello Mike,
On my side the requestEnd event is triggered as expected. Are there any JavaScript errors in the console when initialzing the Grid?
If not put this into a small project and send it here or in a support ticket so we can take a closer look over the case.
Kind Regards,
Petur Subev
the Telerik team
On my side the requestEnd event is triggered as expected. Are there any JavaScript errors in the console when initialzing the Grid?
If not put this into a small project and send it here or in a support ticket so we can take a closer look over the case.
Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
B V Siva Ram Kumar
Top achievements
Rank 1
answered on 04 Nov 2014, 09:54 AM
you have to write code like this
.Events(events => events.Error("error_handler").RequestEnd("requestend_handler"))
Don't use semi colon
.Events(events => events.Error("error_handler").RequestEnd("requestend_handler"))
Don't use semi colon
0
Kelso
Top achievements
Rank 1
answered on 27 Feb 2015, 06:21 PM
Which version is requestEnd in?