This is a migrated thread and some comments may be shown as answers.

Grid is null when used in the asp:Wizard control

1 Answer 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SultanOfSuede
Top achievements
Rank 1
SultanOfSuede asked on 29 Sep 2008, 02:35 PM
I have an asp:Wizard on a web page.  (I'm not using any client-side Ajax stuff.) 

If I place the grid on a form, there is a variable created in code behind for the grid.  I'm able to set the reference's DataSource property because it is initialized.

If I place the same grid into a asp:Step inside the asp:Wizard, the reference is always null.  I could get a reference to it using FindControl() in the Activate event of the wizard, but the problem is that this event fires after NeedDataSource event.  NeedDataSource event cannot set any data because the grid is null at this point.

How does one go about using the grid inside the wizard?  Is anyone doing this?

1 Answer, 1 is accepted

Sort by
0
SultanOfSuede
Top achievements
Rank 1
answered on 29 Sep 2008, 05:06 PM
I figured this out; the asp:FormView I was also using is from the devil and causes all sorts of problems.  I took it out and the grid control began appearing again and its code behind variable was properly set.
Tags
Grid
Asked by
SultanOfSuede
Top achievements
Rank 1
Answers by
SultanOfSuede
Top achievements
Rank 1
Share this question
or