Hey guys!
First off, thanks for your help in the past! Your info is always very enlightening.
I've attached an image that shows/explains what I am trying to do. Basically I want to add a button (ButtonsLeft.Add) left of a dropdownlist, but ONLY there, in one cell, in one row. Right now, the button gets added to every row in the band. (as you can see)
I'm thinking I need to draw everything on the cell. Kinda scary.
In addition, I had some other image-related questions... see attached.
Thanks!!
Don
UltraGridCell exposes Editor/EditorControl properties, so you can specify a different editor for a given cell, and populate the ButtonsLeft or ButtonsRight collection of that editor.
Regarding the image appearing in the list but not the edit portion: The ValueList class, which is what is responsible for showing the dropdown, does not support displaying the image in the list but not the edit portion. You can enter a feature request for this functionality if you like.
Thanks guys! I think I understand how to use the ButtonsLeft property, but I still can't seem to isolate my button to only one cell. I've attached some sample code that illustrates my point.
This code is pretty dumb, but bear in mind that at some point (likely in CellChange) I will be deciding whether to show the button based on some property of the selected combo item. In this sample, I'm just showing the button, regardless of which item is selected. Just fyi.
Thanks,
Brian Fallon said:The ValueList class, which is what is responsible for showing the dropdown, does not support displaying the image in the list but not the edit portion.
Actually, the ValueList has a ValueListDisplayStyle property you can use for this.
The only tricky part, though, is that the UltraComboEditor does not expose the ValueList it is using directly. But you can cheat by getting the ValueList from an item (as long as you have at least one item on the list).
this.ultraComboEditor1.Items[0].ValueList.DisplayStyle = Infragistics.Win.ValueListDisplayStyle.DisplayText;
Upon further investigation, it appears that the DisplayStyle on the ValueList affects the list as well as the edit area, so my suggestion here won't work. Sorry for the confusion.
However, the UltraCombo control does have the ability to display images on the list and not in the edit area using the EditAreaDisplayStyle property. So you might want to consider using the UltraCombo instead of UltraComboEditor.