The cycle of a page and controls on it is globally this
- page loads
- controls are instantiated and added to the page, e.g. grid and datasource control
- state is loaded into the control instances
- binding is setup between controls
at this moment, the grid will call the datasource's ExecuteSelect method. The datasource will then check if it has to select data or not. It can re-use the data of the previous select, if Refetch is false, no data has been changed and saved to the db, and no paging params have been altered (or sorter flags). If it decides the cached data isn't matching what it should return, it refetches the data and with that raises PerformSelect.
The grid gets the data, does its thing with it, e.g. render itself and then the postback ends up in the routine which made this postback happen, e.g button click or the grid posted back itself.
If the grid posted back, and it has to update data, it THEN calls ExecuteUpdate/Insert on the datasource. The datasource control then will merge the changes into the data it has in its cache and will raise PerformWork to get things done.