I have a WebGrid inside a WARP control that is set to refresh on the click of a button. The WebGrid is set to loadondemand and paging. Now when I refresh I rebind the webgrid with new data from the database. The only time I see it refresh is when I select a new page. Now I'm not all that tied to using a WARP but I need the webgrid to refresh asynchronously with updated database data. How might I go about doing that?
If you have ViewState on for the page, it's possible that all the data that the grid needs is already stored in it, and the grid doesn't need to rebind on a postback. You can always force it to rebind by calling "DataBind".
Hope this helps,
-Tony
I am having a similar problem. I am rebinding the WebGird each time because I am using custom paging.
I allow editing and deleting on the rows of the WebGird. Once I have edited/deleted a row I make a call to a database to update/delete the corrisponding record. The table in the database is update the reflect the change. Once this has been completed the user should be presented with a message confirming the action. The message never appears.
While stepping through the code I notice that the WARP's RefreshRequest clientside event is being called, but the WARP's RefreshResponse or RefreshComplete clientside events are never being fired.
The same thing happens when I click to change pages. The WARP's RefreshResponse or RefreshComplete clientside events are never being fired therefor anything that happens post callback is happening.
In this scenario I'd definitely recommend contacting the Infragistics Support department. You can see a list of options (including free email support) at www.infragistics.com/gethelp
Regards,
I came up with another solution. Basically, I have a JavaScript function and a hidden field that submits the form. Kinda ineligent, but...
LiteralControl contentFormRefresh = new LiteralControl(js);this.warpRightContent.Controls.Add(contentFormRefresh);
In the pages source, the following JavaScript is included:
function RefreshPage(forceChangeGuid){window.document.getElementById("RebindFlagSpan").firstChild.Value = forceChangeGuid; window.document.forms(0).submit();}
This works even when a WARP panel is trapping the grid events.
Sounds like you may have been causing the ASPNET_WP.exe (worker process) to recycle due to memory consumption, or creating a timeout scenario due to the large data transfer. 1000 rows is well beyond what I would recommend for page size in the grid. I would recommend somewhere in the realm of 100 actually. Alternatively you can use virtual scrolling, but be sure to set the rowsrange to a small number like 20.
After a few hours of playing around with my problem I have come to the conclusion that the size of the grid's page has a direct correlation between the page going entirely through its lifecycle or getting hung up prior to the RefreshComplete event. I was using a page size of 1000 rows at a time and the screen was not completing its lifecycle. After playing with the number of rows per page, I found the magic number to be 500 rows. Now the screen goes through its entire lifecycle every time without fail.
Hope this helps anyone else having the same or similar problem.