hi there,
i have a code for the above mentioned property below,when i click a value from the datagridview combo box column the for loop runs 2 times y is that??? what do i have to do for the loop to run once.
thanxxxxxxx
private void dgvSubContract_CurrentCellDirtyStateChanged(object sender, EventArgs e)
{
if (dgvSubContract.CurrentCell == null)
return;
if (dgvSubContract.CurrentCell.ColumnIndex == 0)
{
dgvSubContract.CommitEdit(DataGridViewDataErrorContexts.Commit);
if ((dgvSubContract.CurrentCell.Value != null))
{
int r = dgvSubContract.SelectedCells[0].RowIndex;
String subName = dgvSubContract.Rows[r].Cells[0].Value.ToString();
String[] a = new String[4];
a = m.getSudDetails(subName);
for(int i = 0; i< 4; i++)
{
MessageBox.Show(a[i].ToString());
}
return;
}
return;
}
}