jQWidgets Forums

jQuery UI Widgets Forums Grid Grid re-rendered on Ajax call

This topic contains 9 replies, has 3 voices, and was last updated by  Peter Stoev 9 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • Grid re-rendered on Ajax call #83160

    Gunjan
    Participant

    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,
    Gunjan

    Grid re-rendered on Ajax call #83172

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid re-rendered on Ajax call #83179

    Gunjan
    Participant

    Hi 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);
    }
    });
    Grid re-rendered on Ajax call #83181

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid re-rendered on Ajax call #83185

    Gunjan
    Participant

    Hi 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,
    Gunjan

    Grid re-rendered on Ajax call #83186

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid re-rendered on Ajax call #83187

    raj
    Participant

    Hi 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,
    Raj

    Grid re-rendered on Ajax call #83188

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Grid re-rendered on Ajax call #83211

    Gunjan
    Participant

    Hi 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,
    Gunjan

    Grid re-rendered on Ajax call #83226

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.