GridView and NextButtonClick

Discussion in 'ASP .Net Datagrid Control' started by Bruno Alexandre, Jun 7, 2006.

  1. Hi guys,

    I need your expertise on this, cause I can't figure it out why this is
    happening.

    I have a GridView with a lot of steps, but in step 3 I want to stay there
    until I have all the information I need
    (the user is adding the previuos houses for the latest 5 years, and until I
    have all the houses for that period I do not want the user to move to the
    next step)

    in the wzLan_NextButtonClick I have something like:
    Protected Sub wzLan_NextButtonClick(ByVal sender As Object, ByVal e As
    System.Web.UI.WebControls.WizardNavigationEventArgs)

    If (e.NextStepIndex = 4) Then
    If checkDates(60, bolSinceMonth.SelectedValue & "-" &
    bolSinceYear.SelectedValue) Then
    wzLan.ActiveStepIndex = 4
    else
    wzLan.ActiveStepIndex = 3
    end if
    end if
    ....

    But for some matter the Wizard object move the user to the 4th Step even
    knowing that the activestepindex is the number 3...

    How can I do this to work like I want? Why the Wizar always move to the next
    step even if I know that the activeStepIndex is the step I want to be on?
    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)
     
    Bruno Alexandre, Jun 7, 2006
    #1
    1. Advertising

  2. Bruno Alexandre

    Riki Guest

    Why don't you just put validator controls on that step of the wizard?
    Then the wizard will prevent the user from continuing automatically.

    --

    Riki

    "Bruno Alexandre" <> wrote in message
    news:%...
    > Hi guys,
    >
    > I need your expertise on this, cause I can't figure it out why this is
    > happening.
    >
    > I have a GridView with a lot of steps, but in step 3 I want to stay there
    > until I have all the information I need
    > (the user is adding the previuos houses for the latest 5 years, and until
    > I
    > have all the houses for that period I do not want the user to move to the
    > next step)
    >
    > in the wzLan_NextButtonClick I have something like:
    > Protected Sub wzLan_NextButtonClick(ByVal sender As Object, ByVal e As
    > System.Web.UI.WebControls.WizardNavigationEventArgs)
    >
    > If (e.NextStepIndex = 4) Then
    > If checkDates(60, bolSinceMonth.SelectedValue & "-" &
    > bolSinceYear.SelectedValue) Then
    > wzLan.ActiveStepIndex = 4
    > else
    > wzLan.ActiveStepIndex = 3
    > end if
    > end if
    > ...
    >
    > But for some matter the Wizard object move the user to the 4th Step even
    > knowing that the activestepindex is the number 3...
    >
    > How can I do this to work like I want? Why the Wizar always move to the
    > next
    > step even if I know that the activeStepIndex is the step I want to be on?
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Københanv, Danmark)
    >
    >
    >
    >
    >
     
    Riki, Jun 8, 2006
    #2
    1. Advertising

  3. it«s a great ideia...

    but how can I write such validator?

    I have 4 panels that I need to turn the visibility ON if the Month + Year is
    less than 5 years from today...

    any thoughts on this?

    Thank you

    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)


    "Riki" <> escreveu na mensagem
    news:%...
    > Why don't you just put validator controls on that step of the wizard?
    > Then the wizard will prevent the user from continuing automatically.
    >
    > --
    >
    > Riki
    >
    > "Bruno Alexandre" <> wrote in message
    > news:%...
    >> Hi guys,
    >>
    >> I need your expertise on this, cause I can't figure it out why this is
    >> happening.
    >>
    >> I have a GridView with a lot of steps, but in step 3 I want to stay there
    >> until I have all the information I need
    >> (the user is adding the previuos houses for the latest 5 years, and until
    >> I
    >> have all the houses for that period I do not want the user to move to the
    >> next step)
    >>
    >> in the wzLan_NextButtonClick I have something like:
    >> Protected Sub wzLan_NextButtonClick(ByVal sender As Object, ByVal e As
    >> System.Web.UI.WebControls.WizardNavigationEventArgs)
    >>
    >> If (e.NextStepIndex = 4) Then
    >> If checkDates(60, bolSinceMonth.SelectedValue & "-" &
    >> bolSinceYear.SelectedValue) Then
    >> wzLan.ActiveStepIndex = 4
    >> else
    >> wzLan.ActiveStepIndex = 3
    >> end if
    >> end if
    >> ...
    >>
    >> But for some matter the Wizard object move the user to the 4th Step even
    >> knowing that the activestepindex is the number 3...
    >>
    >> How can I do this to work like I want? Why the Wizar always move to the
    >> next
    >> step even if I know that the activeStepIndex is the step I want to be on?
    >> --
    >>
    >> Bruno Alexandre
    >> (a Portuguese in Københanv, Danmark)
    >>
    >>
    >>
    >>
    >>

    >
    >
     
    Bruno Alexandre, Jun 9, 2006
    #3
    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. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,023
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  2. Bruno Alexandre

    GridView and NextButtonClick

    Bruno Alexandre, Jun 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    390
    Bruno Alexandre
    Jun 7, 2006
  3. phil
    Replies:
    2
    Views:
    1,159
    Shahzad Godil
    Nov 14, 2006
  4. Replies:
    0
    Views:
    408
  5. JeffDotNet

    asp:Wizard NextButtonClick and UpdatePanel

    JeffDotNet, Sep 28, 2009, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    1,666
    Allen Chen [MSFT]
    Oct 2, 2009
Loading...

Share This Page