jQuery UI Widgets › Forums › Grid › Reloading grid data
This topic contains 23 replies, has 9 voices, and was last updated by kullayappa 8 years, 11 months ago.
-
AuthorReloading grid data Posts
-
I need to refresh my grid data after the user closes a jqxWindow (to create or edit data). I have captured the window close event and I attempt to refresh the grid, but it does not successfully reload the data from the datasource. Even making a call to create the grid again does not work. Am I not doing something properly?
Here’s the event capture code:
$('#jqxwindow').bind('close', function (event) {
var item = $('#jqxtabs').jqxTabs('selectedItem');
if (item == 0) {
$("#jqxgrid1").jqxGrid('refreshdata');
$("#jqxgrid1").jqxGrid('refresh');
}
else {
$("#jqxgrid2").jqxGrid('refreshdata');
$("#jqxgrid2").jqxGrid('refresh');
}
});
Hello robrichard,
Take a look at the following jqxGrid demo: popupediting.htm.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Dimitar – this sample is a good sample but does not accomplish what I am looking for. I would like the entire grid refreshed.
Disregard – it was refreshing too quickly and not getting the changes from the database – lol!
I have been lookong into this for 6 hours now..
This is not working for me..I send a ajax command that changes the data on the server…
Issue a refreshdata and a refresh.. NO QUERY IS FIRED BACK TO SERVER TO COLECT NEW DATA….
I am quite confused how something this simple and required is not working and not better documented.
James
All you need to do to display the updated data from the server is to execute:
$(“#jqxgrid”).jqxGrid(‘updatebounddata’);
For me $(‘#jqxGrid’).jqxGrid(‘updatebounddata’); doesnt work 🙁
This sample uses “updatebounddata” and it works: http://www.jqwidgets.com/jquery-widgets-demo/demos/php/serverfiltering_paging_and_sorting.htm?arctic. “updatebounddata” makes a new Ajax request using the same data source and re-renders the Grid. That is the method’s purpose and it does it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/I am able to reload the data with “updatebounddata”, but the sortColum, sortOrder, filters etc. remain even after “updatebounddata” has been called. Is there a way to completely reload the grid as if it was loaded for the first time.
Did you ever get this sorted kbajpai? I’m looking for the same myself
Hi jQWidgets team,
i navigated to the second page of the jqxgrid, and upon some action i want to reload the grid to the first page, can you please help me out in this.Hello kullayappa,
You can use the “gotopage” method to go to a given page.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank You, i know there is an option “gotopage”, but i want to load the with different source, at this time i want the grid to load from first page.
My requirement is something like this:
There were three date filter options like ‘Today’, ‘Week’ and ‘Month’. At first i will select a filter ‘Today’ and navigate to the second page and now i select the filter week and will create a new data adapter with different data in source then will send a request, in this case i want the grid to be load from the first page (URL is same but request parameters to the server are different).
As you suggested if use the ‘gotopage’ unable to send a different request parameters to server. Please help me out….
Hi kullayappa,
If you want to load different source, then set the “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.