Updating Gridview with Radiobuttonlist

Discussion in 'ASP .Net' started by James, Dec 15, 2007.

  1. James

    James Guest

    Hello,

    I'm trying to build a simple booking page.

    I have a Gridview and one of the columns is a Radiobuttonlist with the
    options Attending / Not Attending. This is bound to the field [status].

    This works ok, it selects the correct radio button based on the field text.
    But I cannot get it to update when I change the selected radiobutton.

    Can anyone point me in the right direction? I have got it to post back, and
    even click update in Edit template as could not get anything else to work.
    But it just wont update the field. I cannot work out how to add the
    radiobuttonlist as a parameter in the update statement either.

    Any advice would be wonderfull.
    Thanks
    James
    James, Dec 15, 2007
    #1
    1. Advertising

  2. Hello james,

    do u use AutoPostBack = "true" property of RadioButtonList?

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    j> I'm trying to build a simple booking page.
    j>
    j> I have a Gridview and one of the columns is a Radiobuttonlist with
    j> the options Attending / Not Attending. This is bound to the field
    j> [status].
    j>
    j> This works ok, it selects the correct radio button based on the field
    j> text. But I cannot get it to update when I change the selected
    j> radiobutton.
    j>
    Michael Nemtsev [MVP], Dec 15, 2007
    #2
    1. Advertising

  3. Hello james,

    emm, sorry, missed that u have autopostback as true

    btw, if you have postback, that why u cant re-bind your datagrid with new
    updated info?
    not quite understand u
    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    j> Can anyone point me in the right direction? I have got it to post
    j> back, and even click update in Edit template as could not get
    j> anything else to work. But it just wont update the field. I cannot
    j> work out how to add the radiobuttonlist as a parameter in the update
    j> statement either.
    j>
    Michael Nemtsev [MVP], Dec 15, 2007
    #3
  4. James

    James Guest

    Hi

    Thanks for your reply.

    Yes Think I was working too late (4am UK time). I was trying to do some code
    to take the value but could not reference the Template field in the Gridview.

    Actualy have fixed it now by just binding the radiobuttonlist to the field
    and doing a normal update comand parameter.

    Thanks anyway,
    James

    "Michael Nemtsev [MVP]" wrote:

    > Hello james,
    >
    > emm, sorry, missed that u have autopostback as true
    >
    > btw, if you have postback, that why u cant re-bind your datagrid with new
    > updated info?
    > not quite understand u
    > ---
    > WBR,
    > Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
    >
    > "The greatest danger for most of us is not that our aim is too high and we
    > miss it, but that it is too low and we reach it" (c) Michelangelo
    >
    >
    > j> Can anyone point me in the right direction? I have got it to post
    > j> back, and even click update in Edit template as could not get
    > j> anything else to work. But it just wont update the field. I cannot
    > j> work out how to add the radiobuttonlist as a parameter in the update
    > j> statement either.
    > j>
    >
    >
    >
    James, Dec 15, 2007
    #4
    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. H5N1
    Replies:
    0
    Views:
    2,710
  2. news.rcn.com
    Replies:
    2
    Views:
    1,112
    Roedy Green
    Dec 10, 2007
  3. Ben
    Replies:
    1
    Views:
    1,502
  4. Andy in South Jersey

    RadioButtonList(HTML) Control in a GridView

    Andy in South Jersey, Jul 7, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    635
    Andy in South Jersey
    Jul 7, 2008
  5. renuami
    Replies:
    0
    Views:
    3,227
    renuami
    Feb 10, 2009
Loading...

Share This Page