GridView inside Wizard - datasource problem

Discussion in 'ASP .Net' started by Manuel Ricca, Feb 6, 2008.

  1. Manuel Ricca

    Manuel Ricca Guest

    Hello all,

    I have a Wizard control with a GridView inside it. The GridView is
    bound to a SQLDataSource and I set the SelectParameter on the
    SQLDataSource's Page_Load event.
    In fact, when the main page loads it retrieves an ID from QueryString
    and sets a ViewState custom field with it. Then, in SQLDataSource
    Page_Load(), the value is retrieved from ViewState and passed as a
    SelectParameter.

    In the main page Page_Load I have the usual code:
    if(!Page.IsPostBack)
    {
    populateWizard(); // fill some unbound text boxes and stuff
    Page.DataBind();
    }


    Everything works great if the GridView is in the first WizardStep. If
    it is on another WizardStep then it won't get loaded correctly,
    although I can see, by setting a few breakpoints, that the Page_Load
    of SQLDataSource is called and that my custom field in ViewState has
    the correct value.

    Needless to say, if I try to call GridView.DataBind() I get all the
    usual postback error messages (which I still didn't figure out why
    they happen anyway).

    Can anyone help me? I don't know what to do anymore.

    Best Regards,

    Manuel
    Manuel Ricca, Feb 6, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tarren
    Replies:
    0
    Views:
    418
    Tarren
    Sep 12, 2006
  2. Replies:
    0
    Views:
    594
  3. Andy B
    Replies:
    0
    Views:
    432
    Andy B
    Apr 19, 2008
  4. bisrael

    Newbie asp:wizard bind datasource

    bisrael, Mar 4, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    119
    bisrael
    Mar 4, 2005
  5. jobs
    Replies:
    2
    Views:
    1,585
Loading...

Share This Page