StrataFrame Forum

Binding to a RadioButtonGroup

http://forum.strataframe.net/Topic661.aspx

By Ivan George Borges - 3/19/2006

Hi there.

I'm trying to bind a RaioButtonGroup to a "tinyint" field in a table.

It works fine in a VBNET form, but now using in a C# form, I get the following :

System.InvalidCastException was unhandled by user code
  Message="Specified cast is not valid."

Any tip ?

TIA

By Trent L. Taylor - 3/20/2006

I will look into this and let you know what I find.  Thanks.
By Trent L. Taylor - 3/21/2006

Ivan,

I could not reproduce the error so I need a few more pieces of information.  What is the data type of the property that is bound to the radio button group (as shown in the BO Mapper)?  Also, is there NULL data in your database?  Any specifics that you could provide would be helpful.  Thanks.

By Ivan George Borges - 3/21/2006

Hi Trent.

The data type is System.SByte. There is not NULL data in the field. They are only 1 and 2. And I had made it in VB first and it worked fine. If I delete the RadionButtonGroup in the C# form, it works as well.

But if you couldn't reproduce it, then it is probably something I'm missing at the moment.

By Ivan George Borges - 3/21/2006

Hi again Trent.

Gary got it. It's something to do with "tinyint" and C#.

He said he would be reporting it to you.

Thanks a lot.

By Trent L. Taylor - 3/21/2006

Thanks for the "heads-up."  I will look at the TinyInt translations and make sure that everything is working properly.