By Sam Tenney - 2/15/2011
I have synthesized this problem to a very simple example, but I am seeing this same problem everywhere when using my base subclass of an SF Textbox and a standard SF RadioButtonGroup control on the same form. Here is the complete C# class definition for MyBaseTextbox:
using System;
using System.Collections.Generic;
using System.Text;
namespace RadioButtonGroupProblem
{
public class MyBaseTextbox : MicroFour.StrataFrame.UI.Windows.Forms.Textbox
{}
}
To duplicate the problem, just create an SF StandardForm and drop an instance of MyBaseTextbox on the form. You don't even need to bind anything to the textbox or configure it any way. Then drop an instance of a standard SF RadioButtonGroup control on the form. Again no binding is necessary. Notice the property named RadioButtonCount on the RadioButtonGroup control defaults to 2. Now build the solution and notice that the RadioButtonCount has changed to 4. And from then on, attempting to change the Text property of either of the 2 visible radio buttons gets all mixed up.
This problem seems to happen on various types of forms and with or without binding to data etc. This sample is just to simplify testing. My real application requires that I create my own base subclasses of most of the controls but this problem prohibits using them with a RadioButtonGroup control.
Sam Tenney
|
By Ivan George Borges - 2/15/2011
Hi Sam.
Have a look at this post:
http://forum.strataframe.net/FindPost29048.aspx
|
By Terry Bottorff - 2/15/2011
Glad it is not just me. I am glad this has resurfaced again. Thanks Sam.
|
By Trent L. Taylor - 2/16/2011
Don't use the radio group. This control will be deprecated in future releases as it isn't necessary. Just use a radio button. You can have as many "radio groups" as you like on a single form. Just place each "group" of radio buttons in a container (i.e. panel, ThemedPanel, ThemedGroupBox, etc) and those radio buttons will act as unto themselves as a group or collection. The RadioGroup that comes with SF has been left for those that have used it, but in the long-term, will be removed from the control collection as it is not necessary.
|
By Sam Tenney - 2/16/2011
Thanks Trent, I will give that a try.
Sam Tenney
|
By Sam Tenney - 2/16/2011
Hi Ivan,
Thanks for the link to the old post. I have decided to try Trent's suggestion and not use a RadioButtonGroup. I do not know how to bind a field to radio buttons and I cannot find any samples or instructions. I would appreciate any suggestions. I have an SQL column called PayType which contains a single character as follows: "H", "S", or "C" for Hourly, Salary, or Contract. I dropped 3 radio buttons onto a ThemedGroupBox and changed the titles to Hourly, Salary, and Contract. It looks great and the buttons seem to function correctly, but I have no idea how to bind the PayType field to the radio buttons.
Sam Tenney
|
By Ivan George Borges - 2/17/2011
Hi Sam.
I guess I am one of those that still use the RadioButtonGroup.
Also, I tried to find out how to bind the RadioButton individually, but without coding I just have no idea of how to do it. I will try and find out and then will come back here.
|
By Sam Tenney - 5/6/2011
Hi Ivan,
I have still not figured out how to bind a field to a radio button. Have you?
Trent's suggestion was to not use a radio button group, and I need more explanation of how to bind data using Trent's suggestion.
Sam Tenney
|
By Ivan George Borges - 5/6/2011
Nope Sam, I haven't either.
|