I've started to work with ObjectDataSource and had a question about event sequence for it. I didn't find specific documentation and added event handlers with DebugHelper.TracedLine calls (you can use just simple Debug.WriteLiine).
The result was quite logical:
Page_Load (IsPostBack =False)
ObjectDataSource1_Load:
ObjectDataSource1_ObjectCreating:
ObjectDataSource1_ObjectCreated:
ObjectDataSource1_Selecting:
ObjectDataSource1_Selected:
GridView1_DataBound
When user clicked on Select button
Page_Load (IsPostBack =False)
ObjectDataSource1_Load:
GridView1_SelectedIndexChanged
As documented in MSDN DatItem article, GridView1.SelectedRow.DataItem and GridView1.DataSource are Null at that time.
Also (not directly related) event sequence for DataGrid.BindData
DataBinding:
ItemCreated:Header
For each row:
ItemCreated:
ItemDataBound:
ItemCreated:Footer