Hello,
I got a problem that my grid not refresh data after firing OnRowUpdating event.
I need to refresh some other cells (says, total sales) on the grid after I update a cell/a row on the same grid.
I got to set EnableAjax=false inorder to get a post back to server when OnRowUpdating fired on server, after update the dataset, I need to recalculate the whole dataset based on the new values updated, then rebind dataset to the grid (setting datasource property to a table and call DataBind())
But after the page reloaded, I got the same value on "total sales" cell as the previous screen, though the new values that I entered into other cells still there.
What I was missing there?
Thanks Alex, you are genius. It works so well.
Do you think it could work if I set EnableAjex=true and call DataBind() on event RowUpdating on server?
Maybe the rows need to be cleared?
Try grid.Rows.Clear() before calling DataBind()
Thanks Alex,
Yes I did.
Moreover, after 1 post back, If I change some cells, then post back again, then recalculate the dataset, call DataBind() gain, the "total sales" cell will display the result from the previous post back.
Have you tried to call DataBind() within the same post back after the RowUpdating event happened?