custom user control with a devexpress imagecombobox


Author
Message
Fabian R Silva, -
Fabian R Silva, -
Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)Advanced StrataFrame User (909 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
I have a table on my db with some png icons to fill a devex imagecombobox like this:



ID / ICONNAME / IconData (varbinary(max))





I created a user control that fill a internal imagelist from this table (via a "IconBO") and then add items to a imagecombobox (that can't support a datasource), the value of the items on the combo are the id of the icon, all ok from now.



I see how you implemented the IBusinessBindable and IInitializeBusinessObject on datetimepicker and try to do something similar, I created a property "BindableValue" on mysf user control and on this I put on the get /set:



Get

Return CInt(ComboIcon.EditValue)

End Get

Set(ByVal value As Integer)



If Me._InValueSet Then

Exit Property

Else

Me._InValueSet = True

End If



value = CInt(ComboIcon.EditValue)



Me._InValueSet = False

End Set



the problem is that the combo get the id from the property ok, but when I edit the form, change the value on the combo and try to save it, If I see the "BindableValue" property, this reflect the id (example: 9 (integer)), but on the inmediate window I put trycast(me.Parentform,MyTestForm).PrimaryBusinessObject("IconID") (that is the id of my icon) and I get an "1" (integer) value, I not sure what I made wrong that I cannot set the id from the property automatically.



I not known too much about databinding and sure I made something wrong, but not sure what I have to see or learn to made it to work ok.



Thanks for the great support Smile



- Fabian
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