ItemCommand gets always triggered?

Discussion in 'ASP .Net' started by Stijn Verrept, Jan 26, 2004.

  1. I have a grid with a SHOW Column taht is used to show details and a
    TextBox. The user can either enter a reference in the TextBox or
    choose one from the list.

    But when a user clicks in the grid to view details, goes back and then
    enters a number in the TextBox the ItemCommand gets triggered. How can
    I avoid this?

    I tried with putting this condition on top of the ItemCommand event

    if (TextBox1.Text.Length == 0)

    but the previous record in the DataGrid still gets selected.


    --
    Kind regards,

    Stijn Verrept.
     
    Stijn Verrept, Jan 26, 2004
    #1
    1. Advertising

  2. Stijn Verrept wrote:

    > I have a grid with a SHOW Column taht is used to show details and a
    > TextBox. The user can either enter a reference in the TextBox or
    > choose one from the list.
    >
    > But when a user clicks in the grid to view details, goes back and then
    > enters a number in the TextBox the ItemCommand gets triggered. How
    > can I avoid this?
    >
    > I tried with putting this condition on top of the ItemCommand event
    >
    > if (TextBox1.Text.Length == 0)
    >
    > but the previous record in the DataGrid still gets selected.


    Nobody else has this problem or a solution for it?

    --
    Kind regards,

    Stijn Verrept.
     
    Stijn Verrept, Jan 27, 2004
    #2
    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. Stefan Mueller
    Replies:
    5
    Views:
    549
    Steven Saunderson
    Jul 10, 2006
  2. Manick

    datagrid's itemcommand event gets fired

    Manick, Oct 24, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    195
  3. John Joyce

    gets gets

    John Joyce, Mar 26, 2007, in forum: Ruby
    Replies:
    2
    Views:
    380
    John Joyce
    Mar 26, 2007
  4. John Joyce

    Return of gets gets

    John Joyce, Apr 23, 2007, in forum: Ruby
    Replies:
    0
    Views:
    215
    John Joyce
    Apr 23, 2007
  5. yawnmoth
    Replies:
    11
    Views:
    158
    yawnmoth
    Aug 28, 2008
Loading...

Share This Page