Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Updating Gridview with Radiobuttonlist

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 15 Dec 2007 03:07 GMT
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
Michael Nemtsev [MVP] - 15 Dec 2007 06:52 GMT
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] - 15 Dec 2007 06:55 GMT
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 - 15 Dec 2007 13:28 GMT
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

> Hello james,
>
[quoted text clipped - 16 lines]
> j> statement either.
> j>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.