﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » RadioButtonGroup with no default value</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 22 Sep 2026 08:28:19 GMT</lastBuildDate><ttl>20</ttl><item><title>RadioButtonGroup with no default value</title><link>http://forum.strataframe.net/FindPost14158.aspx</link><description>I've setup a RadioButtonGroup with 5 options (values 0-4) on a user control.&amp;nbsp; The designer sets the Checked property of the option with the value of 0 to True.&amp;nbsp; I manually change the property back to False and save the file.&amp;nbsp; Everythings looks fine at this point, no options with a Checked property of True.&amp;nbsp; I close the user control designer in VS and then reopen it and the option with the value of 0 is "checked" again.&lt;/P&gt;&lt;P&gt;I want the user control to render with no option selected and if the BO is saved without the user making a selection I want a required field broken rule to be displayed.&amp;nbsp; Can I make the RadioButtonGroup do this?</description><pubDate>Thu, 07 Feb 2008 09:33:30 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: RadioButtonGroup with no default value</title><link>http://forum.strataframe.net/FindPost14162.aspx</link><description>Just return an alternate value on NULL and set it to a -1 or something like that.&amp;nbsp; This way you do not have a collision of values and NULL.</description><pubDate>Thu, 07 Feb 2008 09:33:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: RadioButtonGroup with no default value</title><link>http://forum.strataframe.net/FindPost14161.aspx</link><description>Thanks Trent that works great but now I'm being tripped up by my BO the control is bound to.&amp;nbsp; The field in the database is a smallint that allows nulls.&amp;nbsp; When I configure the BO in the BO Mapper I customize the field to use a Null Type of Use Nullable Generic which is 0 for this datatype.&amp;nbsp; So when I perform a BO.Add the BO property for the field in question gets set to 0 which is the value of one of my options so it always displays with an option selected.&lt;/P&gt;&lt;P&gt;How should I setup the database field and BO Mapping so no option is selected on a BO.Add?&amp;nbsp; I need to use the values 0-4 for the option values since they are later used in summary calculations.</description><pubDate>Thu, 07 Feb 2008 09:23:16 GMT</pubDate><dc:creator>fansanitis</dc:creator></item><item><title>RE: RadioButtonGroup with no default value</title><link>http://forum.strataframe.net/FindPost14159.aspx</link><description>[quote]Can I make the RadioButtonGroup do this? [/quote]&lt;/P&gt;&lt;P&gt;You are fighting .NET serialization and so this value is being updated and set in the InitializeComponent method...the answer is, "Yes."&amp;nbsp; but you may, in this instance, just need to set this in the constructor or the load instead of fighting the .NET designer.</description><pubDate>Thu, 07 Feb 2008 08:54:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>