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
405
ClickCellButton capture values
posted

Hi there,

I have a multiband grid and in the lowest level band each row ends with a series of buttons (add, edit, delete).  What I want to do is when the user clicks on one of the buttons I would like to capture an id out of a hidden field in the grid/row and use that id to handle the record accordingly based on which button was clicked.  The problem is, I can't seem to find the syntax for pulling that value out of the cell.  If anyone can help with this it would be greatly appreciated.

Thanks, Shane

Parents
No Data
Reply
  • 4555
    Suggested Answer
    posted

    Hi,

     

    You can use the Grid's ClickCellBotton event. From the cell that got clicked you can get the row. From the row object you can get the value of any of it's cells. Your code would look similar to:

      private void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
            {
              UltraGridRow myrow =   e.Cell.Row;
             string myvalue = myrow.Cells[2].Value.ToString();
            }

    Magued

     

Children
No Data