.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 23rd, 2003, 05:18 AM
mail_to_murugan mail_to_murugan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: INDIA
Posts: 2 mail_to_murugan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem in using RadioButton in Datagrid

Dear all,

I am having problem in using Radiobutton (not radiobuttonlist) in Datagrid. When I am binding Data to the DataGrid my Grid is getting Populated with data as well as RadioButton per row. But I am able to select multiple radiobuttons in the Grid but i want to select only one RadioButton in the collections of RadioButtons for each row in the Grid.., Anybody knows pls let me know

My Code below is like
==============
.aspx
===

<form id="Form1" method="post" runat="server">
<table width="90%">
<tr>
<td>
<aspataGrid id="ItemsGrid" BorderColor="black" BorderWidth="1" CellPadding="3" AutoGenerateColumns="true"
runat="server">
<HeaderStyle BackColor="darkblue" forecolor="white"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Select">
<ItemTemplate>
<asp:radiobutton id="lblRadio" GroupName="MyGroup" runat="server"></asp:radiobutton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
</td>
</tr>
</table>

.aspx.vb
=====

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
BindGrid()
End If
End Sub

Sub BindGrid()
Dim connstr As String = "server=myserver;database=master;uid=sa;pwd=sa"
Dim cnn As SqlConnection
Dim da As SqlDataAdapter
Dim ds As New DataSet
cnn = New SqlConnection(connstr)
da = New SqlDataAdapter("select top 5 * from general", cnn)
da.Fill(ds, "general")
ItemsGrid.DataSource = ds
ItemsGrid.DataBind()
End Sub

Reply With Quote
  #2  
Old September 5th, 2003, 01:40 PM
cinners cinners is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Pennsylvania
Posts: 30 cinners User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Rad Buttons

Try placing the Rad buttons in a groupbox on the form that way you can only select one rad button at a time else you have a lot on code to wtite to enable and disable each button thats just to much wirk

Reply With Quote
  #3  
Old September 5th, 2003, 09:28 PM
mail_to_murugan mail_to_murugan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: INDIA
Posts: 2 mail_to_murugan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Dear Cinners
Thanks for replying ur valuable suggestion. I have sorted out the problem.

Thank You

Reply With Quote
  #4  
Old September 29th, 2003, 08:16 AM
jayarajan jayarajan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 jayarajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi...
can u tell me how exactly did u sort out the problem....cause i am facing the same issue...

thankx in advance.

Reply With Quote
  #5  
Old January 16th, 2004, 04:31 PM
medhaonline medhaonline is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 medhaonline User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am facing the same [rpblem

what exactly is the solution. how to put the radiobutton in groupbox?

Reply With Quote
  #6  
Old February 6th, 2004, 09:28 AM
stephenzr stephenzr is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 stephenzr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Do you mean a aspanel?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Problem in using RadioButton in Datagrid


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap