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?
Have you tried to call DataBind() within the same post back after the RowUpdating event happened?
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.
Unfortunately when EnableAjax= true only the row that was changed is getting refreshed.
One more question, if the grid has only 1 row, how can OnRowUpdating be fired since we need to click on the other row to trigger this event ?
If you click anywhere on the page, does it not trigger the event?
No, just on another row in the grid (switching row)
Hm, we can think of adjusting that.
In the meantime you can call commit() method off the editingCore behavior at any time to commit all changes.