Hi, i need some help for selecting a ultragrid cell combobox button list item and return the selecteditem.
I attached here code snapshot and application snapshot. please help
Thanks
Srinivasan J
Hi,
I'm a little confused by what you are asking. What exactly are you trying to do?
The code you have here would work if you assigned an UltraComboEditor as the EditorComponent of the column, but it would not work otherwise. But even if it worked, I can't imagine what the purpose of this code is. Selecting each item on the list consecutively doesn't make a lot of sense.
If you want to loop through the list items, how you do it depends on how you assigned the list to the column in the first place. If you used the ValueList property of the column, then you would use the ValueListResolved of the cell. Otherwise, you would probably need to use the EditorResolved rather than EditorComponentResolved.
I'm just following up on this. Were you able to achieve what you wanted here? Or do you still need more assistance?
I'll keep this case open for 3 more days and close it if I don't hear from you.
hi Mike Saltzman,
extremely thanks for your replay. i am very beginner with infragistics controls, i am learning new things of infragistics day by day.
i am trying with UltraGrid control
from ultragrid i have some set of cell button's, for example:
1. optionset (radio button)
2. date picker
3. check editor
4. combo box editor
from grid cell comboeditor control, there is some set of items like,
item1
item2
item3
item4
step 1 : now my requirement is, my code automatically invoke from grid cell comboeditor,
step 2: select the any item from combo editor and selected item should display in message box
i hope you clear with my explanation.
I'm afraid I don't understand what you are asking.
There no reason why your code should ever need to set a value through the user interface. You do not need to write code to drop down a list and pick an item. If you want to programmatically 'select' an item from the list, all you have to do is set the Value of the cell in the grid to the appropriate value.
If you need to get that value by reading the items from the list, then how you could do that depends on how you created your list in the first place. It says here that you are using UltraComboEditor. That's not really the most efficient way to provide a dropdown list to a cell. You would be better off using a ValueList.
HOWTO:What is the best way to place a DropDown list in a grid cell?
But, if you are using an UltraComboEditor, then what you would do is get the EditorComponentResolved from the cell and then cast that to an UltraComboEditor. Then you could loop through the items collection and when you find the one you want, set the grid cell's Value to the DataValue of the item.
Does that makes sense? Is that what you are trying to do?
I attached a quick sample project here which demonstrates the approach I described.