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.