I am using webdata grid with virtual scrolling. Several times, may be when network behaes slow, i get a runtime error saying "async request failed"
So i want to know how i can avoid this, if i can't then how can i override this message to show a meaningful message to the user.
Hi Kulbhushan,
Thank you for posting in the community.
If the matter is occurring only when your network is busy it may help increasing the timeout of your grid. Instructions on how this can be done can be found at:
http://forums.infragistics.com/forums/p/25369/92964.aspx
I would suggest that you test whether the issue is not occuring after attempting to load additional rows, after some other rows have been modified/added/deleted.
Regarding handling the exception and displaying a meaningful message to the users, you can handle the AjaxResponseError clientside event of the grid and cancel it (in order to not display the propagated exception to the users) and show your own message to the users in the form of an alert for instance.
function WebDataGrid1_Grid_AJAXResponseError(sender, eventArgs){ eventArgs.set_cancel(true); alert("Network busy. Please reload the page");}
Please let me know if this helps.
Thanks Petar for your response it was helpful for giving my custom message, but i would like to give some more information, error description "Sys.WebForms.PageRequestManagerServerErrorException: Requested record cannot be found by key."
Following is the error which i get before the async request failed error, i would also like to tell you that although i should get the first async request for the virtual scrolling just after the 20 rows but for the first load i get it after 120 rows. but when user receives the same data second time virtual scrolling gets the first async request just after 20 rows.
And this Javascript comes only if there is no async request made for the Virtual scrolling and user is editing any value in the grid
Hope this is useful for your help, Thanks
Hi Kulbushan,
Thank you for your reply.
I am still unable to replicate the behavior. Please provide me with more details regarding the setup of your grid's virtual scrolling behavior so that I can continue researching the matter. A small isolated sample page illustrating the issue would be greatly appreciated.
Hi Petar,
Thanks for your follow up, i will try to put it up as you need. But for now the issue got resolved by increasing the the value of "average row height".
Thanks and regardsKulbhushan
Please feel free to contact me if I can be of assistance.