Using the DevEx ColorEdit Control


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Sounds like a good plan.  Perhaps I will introduce this the next time I need to create a color column in the DB.  Fortunately, the column that I am working on is simply for a lookup type table (statuses), so they are quite limited (I think 10 rows so far).

Thanks a ton!
Bill

StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You could also store a color in the database as an integer... ARGB.  Then override the property on the business object within the BOMapper to use the Color.FromArgb() method and Color.ToArgb() method for getting/setting the property.  That's what we ended up doing... saves a little bit of space in the database.
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Amazing!

I was having trouble figuring out how to get color from my DB (stored as string values) to stick to the color property of the ColorEdit control from DevExpress.  After searching various places for how I needed to format the datatype in the backend DB (since I was having trouble getting the control to work properly), it dawned on me that I was approaching this all wrong.  I left the datatype as is in the DB (string) and made an extremely simple change.  I modified the control so that the bound property was EditValue rather than Color (this is the same as what I did with the PictureEdit control). 

BAM!  w00t  It works beautifully!!

Thanks, again, StrataFrame and all of the gurus behind this framework.  You are making my life easier and easier every day!! Smile

Bill

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