I have an ultracomboeditor using a dataset datasource set as the editorcontrol on one of the columns in an ultragrid based on another datasource. I want the dropdown items of the comboeditor to have different forecolors based on another value in the item's datarow and another data value in the ultragrid row. Is there a way to do this?
For example:
The Ultragrid has an available rooms column. The user can select a room from a comboeditor tied to a "rooms" datatable. Each room has a maximum occupancy value. The ultragrid also has an expected occupancy column. When the user drops down the rooms list, I'd like it to display rooms whose maximum occupancy is less than the expected occupancy in a different color so the user can see that the room may not work. (I don't want to filter out rooms from the list, because the user could override.)
I see now... the "MORE" menu comes up with the options all in light grey, which made me think that they weren't enabled.
I'm looking at the valuelistitems now. I should be able to proceed off this one way or another. Thanks!
Hi Jeff,
There is an option to edit your posts. It's on the MORE button in the upper right corner of each post.
Anyway, the fact that the combo is bound and used in a grid doesn't matter. You simply use the combo's Items collection and loop through the items. It makes no difference if those items were created in code or through DataBinding.
Bleh, this forum needs an edit option on posts. I meant to say "this editor is on a grid and its list is databound." :-/
Thought about using an ultradropdown, but want the view styling that the comboeditor provides.
As for looping through the valuelistitem... this editor IS on a grid and the it's list is databound. Is that an still option? How exactly would that work?
Hi,
Loop through the Items collection in the UltraComboEditor and you can set an Appearance on each ValueListItem.
Looping through every item is not very efficient, though. You might be better off using an UltraDropDown control instead of UltraComboEditor. That way you could use the InitializeRow event of the UltraDropDown. But it really depends on how many items are on your list. If it's just a few, then UltraComboEditor should be fine.