Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Getting data from selected datagridview row and which event

private void dataGridView_SelectionChanged(object sender, EventArgs e) 
{
    foreach (DataGridViewRow row in dataGridView.SelectedRows) 
    {
        string value1 = row.Cells[0].Value.ToString();
        string value2 = row.Cells[1].Value.ToString();
        //...
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Getting #data #selected #datagridview #row #event
ADD COMMENT
Topic
Name
1+2 =