Hi ,
I want to send the value of a row in a function after a double click :
I tried something like this :
private void Grid_multiO_DoubleClickRow(object sender, DoubleClickRowEventArgs e) { UltraGrid grid = (UltraGrid)sender; UIElement element =grid.DisplayLayout.UIElement.LastElementEntered; UltraGridCell cell = element.GetContext(typeof(UltraGridCell)) as UltraGridCell; UltraGridRow row = element.GetContext(typeof(UltraGridRow)) as UltraGridRow; object[] row_element = (object[])row.Cells.All; string tickername = Convert.ToString(row_element[0]); if (cell != null) { // MessageBox.Show("The user just double-clicked a cell."); } }
However the line Convert.ToString(row_element[0]); does not work.
Any ideas ?
Thanks
Hello,
I am not sure that I understand what you want to achieve here. Do you want to get a cell's value from the double-clicked row? Or maybe the row object itself?You could do these things by the following lines of code:
e.Row.Cells[0].Value;
and
UltraGridRow row = e.Row;
Please feel free to let me know if I misunderstood you or if you have any other questions.
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.