jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid re-rendered on Ajax call
Tagged: data grid rendering, grid, Re-render
This topic contains 9 replies, has 3 voices, and was last updated by Peter Stoev 9 years, 1 month ago.
-
Author
-
We are implementing a pop-up in a grid having
virtualmode='true'
. To load content of the pop-up screen an ajax call is made. We have observed that whenever we make the ajax call it causes the underlying grid to re-render even if we are not doing any operation on the grid. It’s giving impression of grid refresh even when there is no grid data reloading is happening.How can we restrict this un-necessary grid re-rendering? Any help would be appreciated here.
Thanks,
GunjanHi Gunjan,
It does not make unnecessary Ajax calls. It re-renders itself when you scroll, change page, filter or sort in order to load new data. You cannot avoid that.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I understand that on scroll, change page, filter or sort event grid will re-render itself and make Ajax call to load new data. In our case grid is not making Ajax call rather it’s only calling rendered callback method only. We are not doing any manipulation of grid. We are just making an Ajax call on a button click using below code snippet. After execution of success callback method of Ajax call, grid is calling rendered callback method which is not required as there was no operation performed on the grid. Can you please suggest solution for it.
$.ajax({ type: "POST", url: url, data: data, success: function (data) { alert(data); } });
Hi Gunjan,
If you refresh your data, the Grid should be re-rendered, too. By making an Ajax call you refresh your data.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I am not refreshing grid data. I am aware that grid data refresh will cause Grid to re-render. As you can see in above code snippet, even if I put only an alert in the success callback it’s causing grid to re-render.
Thanks,
GunjanHi Gunjan,
You are making Ajax call. If this is somehow related to jqxGrid, it will refresh the Grid’s data as well, otherwise it will not.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I too facing a similar issue i.e. I’ve tab format in which one of the tab content is splitted into two portions (using jqxSplitter). Left-hand side contains the summary grid (virtualmode:true) and right-hand side contains a form to capture the user details.
Here once the user filled the form and do a submit. The system validates the input and throws an error in pop-up (using jqxWindow).
Whenever the request is sent to server-side to validate the form data, the grid at the left-hand side is automatically getting refreshed. Note: I’m not triggering any actions explicitly by doing “updatebounddata” or grid refresh etc.
I have no idea why it is happening.
Can you please consider this point as well.
Looking forward.
Regards,
RajHi Raj,
You are the same person under another nickname so I totally agree that you have the same issue. I already wrote everything I could comment about this topic. If you make Ajax call, the Grid will refresh its data. In addition, if you do Form postback, the Grid will be re-rendered as everything else on your webpage.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
From your answers I got clue that you don’t want to understand and answer the solution. I told you that I am not performing any operation on grid data and Ajax call is not related to any event on grid. It’s a separate call doing noting with the grid but you are stuck with your answer. So I am not going to ask you again.
I am replying again because you are referring someone else as me. If I had to ask again I would have added comment. So instead of putting absurd comments put more focus on understanding end user’s problem or let other peers answer.
Thanks,
GunjanHi Gunjan,
I can see your IP address and the IP address of Raj so I do not see a reason to discuss this topic about your identity anymore, because you know what a same IP address means. Yes, my answer remains the same because I know how jqxGrid works internally. It cannot re-render itself if something else does not cause that so you either re-load data in some way or do an action like sort, filter, page change, resize, etc which causes re-render.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.