DropDownStyle of bound Combobox is always DropDownList


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I can't seem to get a combo that is bound to have a drop down style other than DropDownList (i.e. only values in list can be selected...no random typing allowed).



This is related to binding. If the combo is unbound, then when the style is set to DropDown, I can type arbitrary values into the combo.



However, if the combo is bound, the style becomes DropDownList (no matter what I set at design time).



I checked the source code (I'm not on the latest beta currently Sad ) and in the BindingEditable property is manipulating the drop down style. I'm thinking it isn't handling the original style correctly and just ends up setting it to drop down list.



The workaround is to set the combo to ignore editing changes and manage that yourself if needed.
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Bump



Trent - can this go on the bugfix list (or is it perhaps addressed in latest beta?) Definitely only happens when SF manages the readonly state
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
This is my current work-around but I am open to suggestion. It seems comboboxes do not have a readonly property so enabled seems the other option. Is there a property that will not dim the cbo if it is disabled?





Private Sub ClientMaintenanceBO1_EditingStateChanged( _

ByVal e As _

MicroFour.StrataFrame.Business.EditingStateChangedEventArgs) _

Handles ClientMaintenanceBO1.EditingStateChanged



Select Case e.EditingState()

Case BusinessEditingState.Editing

Me.cboReferral.Enabled = True

Case BusinessEditingState.Adding

Me.cboReferral.Enabled = True

Case Else

Me.cboReferral.Enabled = False

End Select



End Sub




TIA



Charles

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
Do you get the same behavior if you set the IgnoreManageReadonlyState to True?
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
If you set the ignoremanagereadonlystate to true you get a cbo you can type in but unlike the textboxes, you can type in it when you are not in an editing state. So yes, the managing is what is setting the dropdown to dropdownlist.



So far the code about is the only answer I've found to get the CBO dropdown to behave like other controls (except for it looking disabled when not in editing mode). Not a huge deal, but would probably be good to look at for any refactoring of the managing of edit state in the future. Smile



Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Bump...this appears to be a bug and I'd like to know if that is the case and that is on the list of fix Tongue
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
Greg, this appears to be woking as it should.  Below is a link to a video that shows this in action.  I do recall fixed something in this regard a while back, so you may want to download the most recent beta to see if it resolves the issue in your scenario.

http://www.strataframe.net/downloads/boundcombo.zip

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)Advanced StrataFrame User (924 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Hi Trent



Just installed the latest Beta and this is indeed working properly. Thanks!



(It may have been fixed earlier than the last build as I just realized I had not installed the January build Blush )
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
Glad to hear it...I thought that this had been addressed....thus the head scratching BigGrin
Geoff Hirst
Geoff Hirst
StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)StrataFrame User (219 reputation)
Group: Forum Members
Posts: 123, Visits: 3.5K
Guys,

I got a weird thing happening, opposite way to the guys above. My concern is that I am on Mondays beta.

I have a combobox set to DropDown - Dropdownstyle. When the record is idle, the control looks exactly how I would expect. Then when I go into Edit mode, it the style changes to Simple. I have tracked this as the control is on a  tab control and I have placed a breakpoint on the selectedpagechanged event and I can see my control has it's dropdownstyle changed.

This is kind of opposite to what the guys are saying above.

I have kind of worked around it by testing the editingstate and I can see that the control is getting changed to simple, and I reset it back to Dropdown.

something is a bit odd here.

thanks in advance (Also more than happy to be told I have done something daft)

best

Geoff.

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