Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Having a Radio button one in each column in a Datagrid but belong to the same group?

Reply
Thread Tools

Having a Radio button one in each column in a Datagrid but belong to the same group?

 
 
Satish Appasani
Guest
Posts: n/a
 
      11-13-2003
Hi:

I want to develop a page which contains a datagrid and a couple of columns
in the grid will have radio buttons. All the radio buttons in a row should
belong to the same group so that when i check one the other is unchecked.

Any clue on this? Thanks in advance

Satish


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      11-15-2003
You may want to just add the radio button to each cell on the itemcreated
event handler and then set the group property on each button so that they
belong to the same family to give you the behavior you are after.

if (i.itemtype.listit == listitem.alternate or listitem.item)

radiobutton t = new radiobutton();
t.GroupName = "onefamily"
radiobutton tt = new radiobutton();
rr.GroupName = "onefamily"

e.item.cells[2].controls.add(t);
e.item.cells[3].controls.add(t);
and so on and so forth

this is rough code, it will not compile, but the approach is correct
--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Satish Appasani" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi:
>
> I want to develop a page which contains a datagrid and a couple of columns
> in the grid will have radio buttons. All the radio buttons in a row should
> belong to the same group so that when i check one the other is unchecked.
>
> Any clue on this? Thanks in advance
>
> Satish
>
>



 
Reply With Quote
 
 
 
 
Nick Hertl
Guest
Posts: n/a
 
      12-14-2003
Have you looked into using a TemplateColumn in your DataGrid? This is a
very powerful way to generate neet stuff in custom columns.
You could just set the GroupName to the samething for all the ones you want
to be linked. And then determine which one is selected in your handler
function based on either which row in the table its in or some other data
that you associate with it in the TemplateColumn.
----------------
This posting is provided "AS IS" with no warranties, and
confers no rights.

Please do not send e-mail directly to this alias. This
alias is for newsgroup purposes only.

Thanks
Nick

--------------------
>From: "Satish Appasani" <(E-Mail Removed)>
>Subject: Having a Radio button one in each column in a Datagrid but belong

to the same group?
>Date: Thu, 13 Nov 2003 15:01:38 -0500
>Lines: 11
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#(E-Mail Removed)>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>NNTP-Posting-Host: ddsl-66-161-151-190.fuse.net 66.161.151.190
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
>Xref: cpmsftngxa06.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:16154
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>
>Hi:
>
>I want to develop a page which contains a datagrid and a couple of columns
>in the grid will have radio buttons. All the radio buttons in a row should
>belong to the same group so that when i check one the other is unchecked.
>
>Any clue on this? Thanks in advance
>
>Satish
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column does not belong to table error =?Utf-8?B?TWlrZQ==?= ASP .Net 13 08-18-2010 02:08 AM
Datagrid - each item having two headers one displayed by row another by column Krishna ASP .Net 0 07-13-2006 07:36 AM
Column 'link_url' does not belong to table links. Patrick Olurotimi Ige ASP .Net 7 05-12-2005 03:50 AM
Radio button List problem: How to find value of Radio button list's Selected Item using javascript?? Hiten ASP .Net Web Controls 1 05-26-2004 10:32 AM
How to put a full radio button list in each row of datagrid? John Smith ASP .Net Datagrid Control 1 08-20-2003 12:27 AM



Advertisments