 |
| |
IT SOLUTIONS
FOR YOUR BUSINESS |
|
|
|
Radio Button Group
Description: Visual Studio comes with the standard Group Panel and Radio Button controls; however, there is no control for mapping a group of radio buttons to one data field. The M$ recommendation is to use the drop down combo box; which is ok, unless you really want to use Radio Buttons.
There are a number of existing approaches used to create a Radio Button Group; however, none of these existing approaches appealed to me. So, I wrote a RadioButtonGroup control from scratch.
Usage:
- Add the control to the project references.
- Drag'N'Drop a RadioButtonGroup control on a form
- Drag'N'Drop RadioButton controls on to the RadioButtonGroup control (one for each valid datasource value for the field)
- Set the TagIndexType to one of {boolean, integer, enumeration}
- Set the CurrentSelection to one of the RadioButtons in the group
- Set the SelectedValue databinding to the datasource field
- Set the TAG values on the RadioButton controls to match the corresponding datasource value for the field.
Notes:
- The TagIndexType {boolean} is for the ms-access boolean field type.
- The TagIndexType {integer} is for an integer field type.
- The TagIndexType {enumeration} is not supported at this time.
- The datasource is bound to the RadioButtonGroup control *not* to the individual RadioButton controls.
- The CurrentSelection pick list will include *all* Radio Button controls on the form (something I need to fix) so double check which control is being set (the controls should have a "good" name).
Platform: Visual Studio 2005 C# for DOT NET version 2.x.
Download
This control is licensed for "third party" redistribution and use; see the Redistribution License for details.
31-DEC-2007
|
|
|
copyright © 2003-2009 by Driftwood Technology
|