Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2387
How to get the selected object
posted

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

  • 469350
    Suggested Answer
    Offline posted

    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.

  • 270
    Offline posted
    if you are talking about ultraDropDown control : (WinDropDown ? )

    private void ultraDropDown1_RowSelected(object sender,
    Infragistics.Win.UltraWinGrid.RowSelectedEventArgs e)
    {
    UltraGridRow selected = e.Row;
    string sel = Convert.ToString(selected.Cells["COLUMNX"].Value);
    }


    On Fri, 29 May 2009 21:12:38 +0000 (UTC), "scarleton" <> wrote:

    >I have a WinDropDown control (which appears to be a specialized UltraGrid control) that is databound to a BindingList 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