Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
| Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 1st, 2006, 10:48 PM
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Control inherited from Radio Button

Hi,

I want to create a user control say MyRadioButton. I drag and drop a radio button on the user control and now try to make this MyRadioButton. The purpose of this MyRadioButton is that, I should retain the functionality of radio button + add my own functionalities.

Once I create multiple MyRadioButton on new form and try to work with it, the radio button mutually exclusive checking property is not working. My understanding is that because radio buttons work only within a group and each MyRadioButton is a separate group now. So any work around?

  #2 (permalink)  
Old November 2nd, 2006, 06:00 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Your post and the subjects seems to be contradicting a little bit. Your topic suggest you inherit from RadioButton, which seems to imply you're building a custom server control. But, the post itself is about User Controls. Which of the two is it?

Your solution may be to create a GroupName property on your control. You could make this a view state property so it survives post backs. In the Load event of the control, you can use the public GroupName property to set the GroupName of the RadioButton inside your control.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio button and Repeater control geet799 ASP.NET 2.0 Basics 1 June 19th, 2008 11:43 AM
Radio button gaurisharya C# 2005 2 March 16th, 2008 06:43 AM
radio button anwarraja Javascript 3 September 18th, 2007 08:18 PM
radio-button grstad HTML Code Clinic 3 February 28th, 2006 08:32 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.