DataGridView Events
how to know DataGridViewCheckBoxColumn value has changed in the DataGridView?
I found the answer to the question
There is event CellContentClick.
private void dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
//Column Index of column containing DataGridViewCheckBox
int columnIndex= searchIndex;
if (e.ColumnIndex == columnIndex)
MessageBox.Show("Check Box Status Changed");
}
Deepak BhatiaPosted Sep 21, 2009, 4:48 AM
Kirtan PatelPosted Sep 21, 2009, 4:18 AM
dont forget to mark "Do you like this Answer" please :)
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
int columNumber = e.ColumnIndex;
int RowNumber = e.RowIndex;
// Show Which Cell Changed
MessageBox.Show("Value Changed On Row :" + RowNumber + "and Column :" + columNumber);
}
Rajeswari nathanPosted Sep 21, 2009, 3:23 AM
you can get and check controls using the following code
if (e.Row.RowType == DataControlRowType.DataRow)
{
HyperLink aHyperLinkL = ((HyperLink)e.Row.FindControl("MyHyperling"));
}