Paulagier
asked on
C# DataGridView_RowsAdded event not firing
In a Windows Form I have a datagridview with a bindingsource.
The binding source connects to an external device that adds rows data each 1/20 sec.
Changes of the data are well displayed on the screen (within the datagridview) but the DataGridView_RowsAdded in the code behind does not fire .
I am unable to understand why.
The binding source connects to an external device that adds rows data each 1/20 sec.
Changes of the data are well displayed on the screen (within the datagridview) but the DataGridView_RowsAdded in the code behind does not fire .
I am unable to understand why.
public void dgvvNodes_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
string searchValueLA = "LeftArm";
int rowIndexLA = -1;
Node nodeLA;
foreach (DataGridViewRow row in dgvvNodes.Rows)
{
if (dgvvNodes.Rows[e.RowIndex].Cells[5].ToString().Equals(searchValueLA)) // "position" is at index 5 in the last added row
{
rowIndexLA = row.Index;
nodeLA = dgvvNodes.Rows[e.RowIndex].DataBoundItem as Node; // get the object origin of data in the last added row
break;
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.