OnBeforeRequest Called But Not OnResponse Or OnAfterResponseProcess

3 replies. Last post: June 3, 2011 6:55 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
A YousifMember

We ran into an issue today that hopefully you can provide a better workaround than we're using.  We have the grid that has a virtual page size of 100.  When a grid has more records, e.g., 500, 1000, etc. and the user loads more data or any grid post back action, we "lock" the UI on OnBeforeRequest and then restore it in OnAfterResponseProcess.

We do this to keep the user from doing something stupid during the post back.

Today, I had a grid that has 41 rows.  As I scrolled down to the last row, the grid attempted to load more data automatically which there isn't any since all the rows are already loaded.  The problem this caused is that OnBeforeRequest was called (locking the UI) and then OnAfterResponseProcess was never called since nothing was done.  Because of this, the UI was never unlocked leaving the user unable to do anything.

To work around this, we basically check the following and then unlock the UI.

if ( ((oGrid.TotalLoadedRows <= oGrid.LayoutSettings.VirtualPageSize) &&
(oGrid.TotalRows <= oGrid.LayoutSettings.VirtualPageSize)) ||
(oGrid.TotalLoadedRows == oGrid.TotalRows) ) { UnlockUI(); }

It would be nice if there was another handler you guys can provide when OnBeforeRequest doesn't do anything so we can do any clean up when OnResponse and/or OnAfterResponseProcess is not called.  So please consider adding this to the next patch fix or update.

All times are GMT -5. The time now is 12:46 AM.
Previous Next