jQuery UI Widgets › Forums › Grid › Issue with refreshdata
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 2 months ago.
-
AuthorIssue with refreshdata Posts
-
Hello everyone,
Please, I need your help with this problem that I don’t know how to solve it…
I have a jqxgrid that have a toolbar with an action of AddNewOne, this method work perfectly fine, but the problem is that the object that I get back from the server API is different to the object that I’m showing in the grid, then I need that when I’m doing the add action refresh all the grid to get the new data from the server, I’m trying to do this:
success: function (data) {
if (data.Success == true) {
$(“#lbNotificationSuccess”).text(“Phone Saved Successfully”);
$(“#jqxNotificationSuccess”).jqxNotification(“open”);
$(‘#gvPhoneSchedule’).jqxGrid(‘refreshdata’);
$(‘#gvPhoneSchedule’).jqxGrid(‘refresh’);
$(‘#gvPhoneSchedule’).jqxGrid(‘updatebounddata’);
commit(true);
}
else {
$(“#lbNotification”).text(“An error occured. ” + data.Message);
$(“#jqxNotification”).jqxNotification(“open”);
commit(false);
}
}
I’m using those method for refresh the data, but the grid doesn’t refresh, I have to press F5 the the data appears on the grid.
Please any help with that!!!Thank you very much!!
Hello, I solved the problem calling the same function again… but I add an issue doing this, the method deleterow it is firing more than one time when I close and open the object window…
Hello everybody, I was looking for to long trying to reach a method that allow me make the jqxgrid dataadapter invoke a method in the server, the method refreshdata, refreshunbound, and refresh don’t call the method in the server that load new data enter, is there any method in the jqxgrid that allow me load data from the server in a refresh???
Thank you very much for your patient.Hi jperera,
updatebounddata rebinds the Grid using the same dataAdapter. If your dataAdapter initially makes Ajax call to your server, calling updatebounddata will make a new Ajax cal. If you want to use a new data source, you have to set the Grid’s source property to point to new dataAdapter instance.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.