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
1300
access to a row after a double click
posted

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

Parents
No Data
Reply
  • 71886
    Verified Answer
    Offline posted

    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.

Children