473,383 Members | 1,880 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,383 software developers and data experts.

add radiobuttons to the first column in a datagrid

Hello.

I need some help on how to add a radiobutton to every row in the first
column in a datagrid.

The datasource to the datagrid is a dataTable. I loop through this
table to add rows and just need to find the right way to add a
radiobutton for each row...

I need the radio buttons to be grouped so that only one can be selected
at the time.

Thanks for any help you can give me :)

Nov 7 '06 #1
2 1934
make the column a template column and add the radio buttom in the item
template.

Then on post back you should be able to loop through the rows access the
seconds element in the controls collection of the first cell. (first and
third items will probably be htmlliteralcontrols).

HTH

Ciaran O'Donnell

"ne****@gmail.com" wrote:
Hello.

I need some help on how to add a radiobutton to every row in the first
column in a datagrid.

The datasource to the datagrid is a dataTable. I loop through this
table to add rows and just need to find the right way to add a
radiobutton for each row...

I need the radio buttons to be grouped so that only one can be selected
at the time.

Thanks for any help you can give me :)

Nov 8 '06 #2
Thanks for answering me!

I cannot find out how to make the column a template column. I am
developing a windows form so I use the System.Windows.Forms namespace.

Am I overseeing it, or is it possible to make a column a template
column in the windows forms datagrid?

Ciaran O''Donnell skrev:
make the column a template column and add the radio buttom in the item
template.

Then on post back you should be able to loop through the rows access the
seconds element in the controls collection of the first cell. (first and
third items will probably be htmlliteralcontrols).

HTH

Ciaran O'Donnell

"ne****@gmail.com" wrote:
Hello.

I need some help on how to add a radiobutton to every row in the first
column in a datagrid.

The datasource to the datagrid is a dataTable. I loop through this
table to add rows and just need to find the right way to add a
radiobutton for each row...

I need the radio buttons to be grouped so that only one can be selected
at the time.

Thanks for any help you can give me :)
Nov 10 '06 #3

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

Similar topics

0
by: BillG | last post by:
I have a column called "Role" that has two choices "Agent" and "Administrator". I am using radiobuttons in the column role. I have no problem displaying the rows and having the proper radio...
0
by: RB | last post by:
Hi, I have retreived questions and answers from DB tables, and display them into datagrid. QNo Quest A B C 1 Quest1 5 7 9 2 Quest2 A D C 3 Quest3 gold silver bronze The values for possible...
1
by: Ken Varn | last post by:
I have a problem where my DataGrid would not maintain the ViewState of my databound rows. I finally narrowed down the problem. If my first column is a template column, the view state for the...
2
by: Nathan | last post by:
Of all the VB.NET techniques I've learned so far, databinding has to be the most complicated. I've got a problem (among others) with radio buttons. I finally got the radion buttons to bind...
11
by: Rourke Eleven | last post by:
I have looked and searched. What good is the databind property on Radiobuttons? How does one go about actually using it? What is a good resource on this? I understand that I can easily get/set...
4
by: Grace | last post by:
I use a datagrid included in a repeater. as following: (.aspx) <asp:repeater id="rp_perform" Runat="server"> <HeaderTemplate> <table border="0" bgcolor="gray" cellspacing="0" cellpadding="0">...
4
by: news.microsoft.com | last post by:
Hello, I have two databound radiobuttons which have advanced databinding properties of onpropertychanged enabled so that I can raise the columnchanged event whenever the radiobuttons are...
0
by: neoret | last post by:
Hello. I need some help on how to add a radiobutton to every row in the first column in a datagrid. The datasource to the datagrid is a dataTable. I loop through this table to add rows and...
0
by: PaulS | last post by:
Hello! I put on Form PictureBox and I set big image. Next I put many radiobuttons (80) on PictureBox, but I have problem. I want that 10 radiobuttons have own Checked, next part of 10...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.