Disable/Lock grid during refresh?

3 replies. Last post: May 28, 2010 1:19 PM by Yudi
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

I have a grid with a single updatable field and a read-only computed field. Everytime you edit the first field the read-only one should change (we need to do a DB call to re-calculate it according to whatever you just updated on the first). A refresh is needed for this, since I'm using an ObjectDataSource, I'm doing that onUpdated.

My problem is... if you keep spamming changes/edits during that extra refresh the grid crashes. You can simulate this by modifying the BindToCustomObject sample in the R2 samples solution. Add on the ODS:

OnUpdated="RefreshGrid"

 And on the Codebehind file:

protected void RefreshGrid(object sender, ObjectDataSourceStatusEventArgs e)
    {
        WebGrid1.ClientAction.Refresh();
    }

 

And try spamming changes on the region field... Is there a way to lock the grid during this flypostback to prevent this from happening? Or to prevent the users from spamming changes?

I'm using  WebGrid 7.0.7200.401 and IE7

Thanks

All times are GMT -5. The time now is 3:54 PM.
Previous Next