I have a WinDropDown control (which appears to be a specialized UltraGrid control) that is databound to a BindingList<ObjectDetails> collection.
It is my impression that if I want to take action when a user selects an item from the collection, I need to handle the RowSelectedEventHandler.
The question I have is, once in that handler, how do I get the ObjectDetail object that was selected?
Sam
The UltraDropDown is not a standalone control, it only works as a dropdown in a grid cell. So if you are using the UltraDropDown, you probably want to trap the CellChange event of the grid, not the RowSelected event of the dropdown.
For a standalone dropdown control, you would use UltraCombo. In which case, you probably want to use the ValueChanged event and examine the Value property of the control, rather than RowSelected, because RowSelected will not fire if the user changes the value by typing into the control.
You are correct, I am using the UltraCombo. How do I go about getting the selected object from it? In mikrokom's example (which I am assuming does not apply because this is an UltraCombo, not the WinDropDown) he assumed that the object was holding a string. It isn't, it is holding an object called "Class Details", so it is like this:
List<ClassDetails> listToDisplay = GetClassDetailsList();ultraComboCtrl.DataSource = listToDisplay;
The goal is once a user selects a row, to get back the ClassDetail that was selected.
Hi Sam,
All you need to do is get the Value property of the control, then.
Oops, I responded too quickly before I realized you are binding to a list of objects.
You have two options here. One of them is described here:
Grid of complex objects and ValueList columns - Infragistics Community
The other option is described here:
Binding Problem to an UltraDropdown where the Grid Colum is an Entity - Infragistics Community
I need to put BindableValueList into an assembly that does not currently have any of your controls, which assembly do I need to reference?
The BindableValueList is in Infragistics.Win. That assembly has a dependency on Infragistics.Shared, so you will need both.