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
1180
Grid+DropDown+selected value?
posted

I need to get selected valuelistitem from dropdown that is assigned as editor to the cell. My combo has items with same texts/values and additional information is stored in value list item tags.

I used two approaches, both failed:

1. Using AfterCellListCloseUp:

 UltraComboEditor cmb = e.Cell.EditorComponentResolved as UltraComboEditor;

selected item/selected index are null and -1. is there a way to get exact value list item that was clicked (other than searching by cell.text)?

2. using cell change to trigger .PerformAction(UltraGridAction.ExitEditMode), and in AfterCellUpdate i tried the same - again selected item, selected index are no use.

Any other way to get valuelistitem?

Parents
No Data
Reply
  • 469350
    Offline posted

    You cannot get the SelectedIndex or item from the Combo. The Combo services the entire column, so it cannot possibly return a meaningful value. You have to get whatever information you need from the cell using Text or Value property of the cell.

    If you need to find the matching item on the list given the Value or Text or the cell, then you can use the cell.ValueListResolved.GetText or GetValue methods.

Children