Can't access Page objects in the DataSource.SelectObject MethodCan't access Page objects in the DataSource.SelectObject Method
Old forum URL: forums.lhotka.net/forums/t/4348.aspx
ballistic posted on Thursday, February 14, 2008
Hello,
I'm encountering some strange behavior.
I have a formview on my page. Inside this formview I have a couple of links and a gridview. The formview DataSourceId is set to my CSLA datasource.
In the DataSource.SelectObject Method I need to access the gridview (for paging), however it seems that my gridview is Nothing (I'm using the FormView's FindControl to get it). This is also the case for the links and the formview!
Is there a reason I would not have access to these objects? Am I too early in the event lifecycle? Or are the objects in a formview only available after the formview has databound?Copyright (c) Marimer LLC