ComboBox Question - Displaying data NOT contained in the options


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I think this is a really simple question.... but I don't know enough about .NET to be able to figure out my own answer.  I am converting some data from FoxPro to .Net and SQL Server.  Well the old FoxPro system had a ZipCode table, just so happens that the table doesn't have all the zip + 4 zipcodes.  In some of the client information data (different table, like a patient table or something) they have the zip + 4 codes entered... If I have a combobox based on the zipcode table (and it dosen't have the + 4 stuff) how do I get the system to display the information for the user if it is NOT contained in the data?  Right now I just get a blank combobox.

I understand that the combo doesn't show anything if it doesn't find a matching value in it's data (doesn't the native .Net combo allow this), but this is something that I could do in FoxPro (I know..... I hate bringing that up but that is the way my mind is working.... I need to start thinking .NET).

Any and ALL help will be appreciated...  even if it is "it doesn't work that way, get a better conversion routine".

Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
The reason FoxPro worked is primarily because of SET NEAR.  You can ultimately get the same results as you did in FoxPro, but you are going to have to create your own ComboBox that basically does a "NEAR SEEK" when trying to match the values up when binding.  I will try to think of a more simple solution...but you are basically wanting binding by incremental search.  I would have to play with this to see if there is even a remote possibility for this to work on a standard combo.  I think it will end up being a custom control. Ermm  Sorry I don't have a better answer.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Even without a "near search" doesn't the FoxPro combo allow you to enter a value that is not in the list to select from?  If the list is filled with values from 1 to 10 and you type 40 in the combo the 40 would still be displayed you just have to check another property of the combo to get the value, I think it was the text property instead of the value property.  I think the native .Net combo allows this but I can seem to get the SF combobox to allow this functionality.

Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If you are storing the ZIP code as a whole in the field, just change the BindingProperty from SelectedValue to Text.  This way it will show regardless.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Doing that yields the same results.  When the value in the table isn't present in the combo the last value that was displayed in the contorl stays visible.

I am sorry about all these basic questions, but everthing is so foregin and I don't know if it is a .NET thing or I am not using the Framework correctly.  I appreciate all the time and effort you put into answering ALL question on the board.

Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Is the field you are binding to a String value?  If so, how are you populating your combo?  Do you have the combo set to a DropDownList or just a DropDown?  In order for my previous post to work, you may have to have it set as a DropDown rather than a DropDownList.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I think I found out why this is confuesing me so much,  I had my combo setup exactly like you just suggested, it still didn't work so I decided to do some console.writeline's to check the value of the dropdownstyle property.  It showed dropdownlist NOT dropdonw like it is set to in the designer.  I changed the value in code... the combo work fine... until you naviage to the next record.  Check the dropdownstyle, back to dropdownlist.

I guess I am NOT going crazy, I just have to find out where in SF the style is being changed.  Any suggestion as to where to start looking? Or maybe I have the toolbox not setup properly after the update?  Don't know.

Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
We do make a change to the style when the editing state changes and the IgnoreManageReadOnlyState is set to False (the default).  The reason we change the style is to make a combo and a drop down list look the same when disabled...go figure why Microsoft would make the disabled states look different.  Try setting the IgnoreManageUIReadonly state to True on the combo and set it to DropDown and see if it works.  If so, just handle the EditingStateChanged event of the business object and manully set the enabled state of the combo based on the editing state...this is easier than trying to control the other.
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Thanks for the info.  I just noticed that, when it is dropdown it has the disabled gray color.  Well that just makes it look a little funky.

Good new....  I really wasn't going crazy!!!Hehe

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yeah...sorry for the trouble.  You could set the style back when you disable it I guess, to make it look more in line with the rest. 
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