DropDownStyle of bound Combobox is always DropDownList


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K 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.
Replies
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K 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 (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
Do you get the same behavior if you set the IgnoreManageReadonlyState to True?
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