Link to home
Start Free TrialLog in
Avatar of ChrisMDrew
ChrisMDrew

asked on

Refreshing a DataBound grid

Hi,

I have an Infragistics WebDataGrid which is data bound to an asp:ObjectDataSource.  This seems to work OK.  Each row in the grid has an edit and delete button.

When the edit button is clicked I popup a WebDialogWindow to edit the data displayed on the row.  Clicking OK calls some client side javascript to validate the data and if ok calls a server side btnON_OnClick function.

In this function, I save the updated data back to the database and call
   
    GridUsers.DataBind()

My thought was that this would cause the data source to refresh and update the grid with the changes just made.  Stepping through in debug, I can see that the DataBind() does indeed cause the underlying data source to re-read the objects from the database and this does pick up the changes - however the GRID does not seem to show these changes uintil I refresh the page????

I am certain that the DataBind is causing the ObjectDataSource to refresh - why isn't the grid refreshing also?  Do I have to call anything else to cause the display to refresh?
Avatar of xav056
xav056

put your webgrid in an Ajax update panel
that should do it for you, the page needs to refresh the view, you can do this with an async post back if you add an update panel
Avatar of ChrisMDrew

ASKER

The WebDataGrid is supposedly a full Ajax control - never the less I added an UpdatePanela round it but unfortunately no effect...
make sure the update mode is set to always in the update panel
ASKER CERTIFIED SOLUTION
Avatar of ChrisMDrew
ChrisMDrew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Unfortunately the update panel does not work - seems to be a bug in the implementation of the control