Problem with textbox template columns in a GridView

Discussion in 'ASP .Net' started by jediknight, Sep 19, 2007.

  1. jediknight

    jediknight Guest

    I am having some problems getting the correct values from a textbox in
    a gridview.

    When I create the gridview my textboxes are initialised to zeros but
    the user can then updates some of these. There are a few textboxes
    which where I have set the enabled property to false and these
    textboxes work out various javascript equations from the user entry
    into the other textboxes.

    When the form is posted back, these disabled textboxes contain zeros
    instead of the values that the javascript work out for me!

    Why is this and what can I do to rectify this problem??


    Thanks in advance.
     
    jediknight, Sep 19, 2007
    #1
    1. Advertising

  2. jediknight

    bruce barker Guest

    the browser does not postback disabled fields, so the server never gets
    the values. you can create hidden fields that javascript can pass the
    values back with.

    -- bruce (sqlwork.com)

    jediknight wrote:
    > I am having some problems getting the correct values from a textbox in
    > a gridview.
    >
    > When I create the gridview my textboxes are initialised to zeros but
    > the user can then updates some of these. There are a few textboxes
    > which where I have set the enabled property to false and these
    > textboxes work out various javascript equations from the user entry
    > into the other textboxes.
    >
    > When the form is posted back, these disabled textboxes contain zeros
    > instead of the values that the javascript work out for me!
    >
    > Why is this and what can I do to rectify this problem??
    >
    >
    > Thanks in advance.
    >
     
    bruce barker, Sep 19, 2007
    #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. =?Utf-8?B?RG9ydGU=?=
    Replies:
    0
    Views:
    4,582
    =?Utf-8?B?RG9ydGU=?=
    Dec 14, 2005
  2. Replies:
    4
    Views:
    944
  3. Jacksm
    Replies:
    2
    Views:
    860
    Paul Chalekian
    Nov 21, 2006
  4. Pavel Tsekov
    Replies:
    0
    Views:
    183
    Pavel Tsekov
    Sep 14, 2006
  5. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    885
    Vinki
    Apr 25, 2007
Loading...

Share This Page