RadioButtonGroup problem


Author
Message
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
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
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sam.

Have a look at this post:

http://forum.strataframe.net/FindPost29048.aspx
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Glad it is not just me. I am glad this has resurfaced again. 
Thanks Sam.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Thanks Trent, I will give that a try.

Sam Tenney
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
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
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sam.

I guess I am one of those that still use the RadioButtonGroup. Whistling

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.
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
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
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Nope Sam, I haven't either.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search