Catch the value of the ID in the DataGridViewe C # [closed]

-1

I have datagridview and in this grid there is associated data from a database table, so I wanted to get only the id from the value that is in datagridview , and play on a property of type int you receive this value. How do I?

    
asked by anonymous 07.02.2018 / 21:01

1 answer

1

I got the result using this line of code

   dataGridView1.CurrentRow.Cells[0].Value.ToString()
    
07.02.2018 / 21:32