473,779 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating Gridview with Radiobuttonlist

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
Dec 15 '07 #1
3 2219
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
jI'm trying to build a simple booking page.
j>
jI have a Gridview and one of the columns is a Radiobuttonlist with
jthe options Attending / Not Attending. This is bound to the field
j[status].
j>
jThis works ok, it selects the correct radio button based on the field
jtext. But I cannot get it to update when I change the selected
jradiobutton.
j>
Dec 15 '07 #2
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
jCan anyone point me in the right direction? I have got it to post
jback, and even click update in Edit template as could not get
janything else to work. But it just wont update the field. I cannot
jwork out how to add the radiobuttonlist as a parameter in the update
jstatement either.
j>
Dec 15 '07 #3
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
jCan anyone point me in the right direction? I have got it to post
jback, and even click update in Edit template as could not get
janything else to work. But it just wont update the field. I cannot
jwork out how to add the radiobuttonlist as a parameter in the update
jstatement either.
j>
Dec 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2314
by: Patrik | last post by:
hello, based on a client login I call a GridView that presents the appropriate questionnaire for that person. I added three columns (template fields) to the gridview that are radiobuttons. The client has to choose one radiobutton per row (either YES, NO, or PERHAPS). Yes would have a value of 1, No 2, perhaps 3. 1) I need to restrict the choice to one of the three radiobuttons ? 2) Need to insert the client's choice for every row in...
1
1723
by: Eric Effer | last post by:
Hi everyone I am tryin to get the selected index from this gridview while selecting the radiobuttonlist. I dont want to use a button for the row though. Anyone knows how to do this? thnks Eric
3
2192
by: Marc Grutte | last post by:
Hi I am trying to bind a custom datasource to a gridview whilst paging is enabled. What is missing in this code to make the paging + binding work? thanks M <%@ Page Language="VB" %>
5
23634
by: NKaufman | last post by:
<asp:GridView ID="Basic" runat="server" DataKeyNames="QuestionID,isHeading" AutoGenerateColumns="false" AllowPaging="true" PageSize="100"> <Columns> <asp:BoundField Visible="false" DataField="QuestionID" HeaderText="QuestionID"></asp:BoundField> <asp:BoundField DataField="QuestionDesc" HeaderText="Question" ItemStyle-HorizontalAlign="Left"></ asp:BoundField>
1
2340
by: l3d007 | last post by:
I used this example straight from msdn in a gridview that already sorts based on each column. For some reason I cannot get it to sort based on two sorting expressions.Is there some property of the grid view i have to set in order for this to work? <%@ Page language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> void...
1
1985
by: Ben | last post by:
Hi, The gridview contains a radiobuttonlist with boolean values (true/false) coming from a database. In normal mode, the gridview displays True or False for that field. What i want is to change True' and 'False' by 'Yes' and 'No' in normal mode. I tried this, but still get True / False. Thanks for help
0
1430
by: =?Utf-8?B?QW5keSBpbiBTb3V0aCBKZXJzZXk=?= | last post by:
I want to use a RadioButtonList Control(HTML) in a GridView control. I can see the RadioButtonList control with each row in the GridView with the code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Question_id" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="q_Description"
13
3519
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show allowing the user to make a selection from the popup window. I have enabled AJAX extensions and have a working sample outside of a gridview. However, when I click in the textbox of a gridview row, all I see is a really small square instead of the...
1
10763
by: renuami | last post by:
Hello friends please advise....... I am building an application for Survey. For this i have GridView with two Template fields. The first Template has Label (To display question text) and RadioButtonList (for options). The 2nd Template field is the primary key value. And i have a button on the form. In the button click event i wrote code to grab RadioButtonList values.But the selected value is coming as null....PLEASE ADVISE.... Let me...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.