StrataFrame Forum

BrowseDialog - true/false combo

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

By Aaron Young - 7/10/2008

I have a true/false bit field in SQL and I would like to display this to a user in a browse dialog as a combobox containing true/false selections. I have played around with the Combo - Enum option in the SearchFields dialog but I can't seem to get it to work for System.Boolean.

Assuming that this is possible, can anyone point me in the right direction please?

Thanks in advance,

Aaron

P.S. I was trying to use the Combo - Enum option as I don't think I can use a CheckBox?

By Trent L. Taylor - 7/10/2008

Actually you are going down the right road and getting close.  You will want to use the Enum options and create an enum with values like this:

Public Enum MyBooleanEnum as Integer
    No = 0
    Yes = 1
End Enum

or

Public Enum MyBooleanEnum as Integer
    False = 0
    True = 1
End Enum

Once you have the enum, then you will assign this when setting up the SearchField.  Then you will want to assign a value of -1 as the "Not Used" value for the TopMost Item (Combo - General page) which is should be by default anyway.  This should work just fine as I did it the other day. 

By Aaron Young - 7/10/2008

Works great - thanks!

By the way, the BrowseDialog is a very powerful control - I particularly like the subtle Time Action on the date. That tells me someone has been there and done that before me! Smile

By Trent L. Taylor - 7/10/2008

particularly like the subtle Time Action on the date. That tells me someone has been there and done that before me

Thanks....yeah, we hit that wall a while back.  Smile  So we knocked it down BigGrin