C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

RadioButtons


Posted Date: 04 Nov 2009      Posted By: Naresh      Member Level: Silver     Points: 1   Responses: 5



Hi All
In windows C#
i am retrieving data from database(i.e one column data from db).i am getting four values(Select names from table).i have to add radiobutton for each value.
like this Naresh RadioButton
Nadimpalli Radiobutton
xyz Radibutton
abc RadioButton





Responses

Author: Rabiya    04 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

You mean to add radio buttons dynamically after fetching the names from DB?

~Rabiya~



Author: vipul    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,
you want add only "Radiobutton" string after each name or you want control after each name?
if you want to control then you can used radiobutton list control

<asp:RadioButtonList ID="test" runat="server">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="1"></asp:ListItem>
<asp:ListItem Text="3" Value="1"></asp:ListItem>
<asp:ListItem Text="4" Value="1"></asp:ListItem>
</asp:RadioButtonList>


and if you want to in your way than you can used repeater control this way and bind you datasource to repeater control

<asp:Repeater ID="TEST" runat="server">
<ItemTemplate>
<%# Eval("Name") %><asp:RadioButton ID="rdb1" runat="server" />
</ItemTemplate>
</asp:Repeater>


Please Rate This Answer If They Helpful

Thanks & Regards
Patel Vipul



Author: Naresh    04 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Ya i have to add radiobuttons dynamically in c# windows


Author: SuganyaCMR    04 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi Patel Vipul,

There is no radio button list in windows application. your coding is wrong

Regards,
Suganya

In order to succeed, you must first be willing to fail!
Rate my post!.If u found useful



Author: Deepika Haridas    09 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Yes as per Suganya said there's no Radio button list in Windows application. You need to use Radio button and group it.



Thanks & Regards,
Deepika
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Post Reply
You must Sign In to post a response.
Next : Cyrstal Report 'Keep Group Together' option + programmatically
Previous : Crystalreportviewer not load and ask "database login"
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use