473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to store selected radio button in datagrid of wpf

6
Hi All,

I have a datagrid which display all the questions for the users to answer.Each question is accompany by 4 radio buttons with the options agree, strongly agree, disagree, strongly disagree.The design of the datagrid is as below:


Questions Agree StronglyAgree Disagree StronglyDisagree

Ques1 o o o o
Ques2 o o o o
Ques3 o o o o
:
:
:

o represent Radio button


All the radio buttons under the column of agree is define under one data template,this apply to the column of strongly agree, disagree, strongly disagree as well.

How do I read through datagrid so that I could know whether which radio button is being selected?

How do I store the selected radio button back to remote database?

Please guide me. Thanks in advance.
Aug 8 '11 #1
1 3374
GaryTexmo
1,501 Expert 1GB
There should be a Rows property. This is a collection of all the rows in your data grid. Each of these rows should have an index for the column, which will contain the data in that row/column index.

Have a look and see what's contained within a cell. I don't know what will be the case when you have radio buttons... if it's just a radio button inside the cell (ie, Cell[col].Value is a RadioButton object) or if it's something else. Inspect it with breakpoints in the debugger and/or do a GetType() call on it to see what it is. That will give you some idea of what you can do.

Once you have this, you can write the values to wherever you like.
Aug 8 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Verner Vaz | last post by:
Select Email ID based on 'a' selected radio button Hello there, I have a simple form with some fields to be filled in and when submitted is emailed to a couple of email ID. Now, this form...
2
by: Mark Haase | last post by:
Hey All-- I'm rusty on my JavaScript but I'm pulling it back out to do a PHP/MySQL database application. I'm doing all the validation in PHP, but I'm using JavaScript to show/hide questions...
1
by: Rage Matrix | last post by:
Hi all, I have a small problem with Access radio button groups in VBA. I've got a radio button group called fraSearchMode with three radio buttons in it. At a certain point, I want to see which...
1
by: walterd | last post by:
Hi I have a DataGrid with dynamically created Radio Buttons using ItemTemplate. How can I catch the Click Event for the selected Radio Button in Client Side? I need to perform some validation...
0
by: daz_oldham | last post by:
Hi Everyone I have a form with a number of dynamically generated radiobuttons in it. I am setting the GroupName for the radio buttons, and I would like to be able to find the selected value...
1
by: querry | last post by:
`Hi all, I am trying to get the selected radio button item in a radio button list using javascript. I am successful at doing this, but the problem is I have several Radio Button Lists, and the...
3
by: santhosh89 | last post by:
hi guys, see i want to develop a script and developed one but it s not working. the concept is there will be three radio buttons. the user has to check one radio button and click the button next...
4
by: padmapriya | last post by:
I need to create three radio buttons and when the radio button is clicked, the corresponding text fields such as 3 different address types should get activated. If i clicked the first radio button,...
3
by: sasimca007 | last post by:
Hello friends, How to get which radio button is clicked in javascript?, when a page having 5 radio buttons with same name.
1
by: lipton | last post by:
how can i compare a mysql table feild value with selected redio button value with php
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.