Updating Gridview with Radiobuttonlist

J

James

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
 
M

Michael Nemtsev [MVP]

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>
 
M

Michael Nemtsev [MVP]

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>
 
J

James

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top