private void dataGridView1_SelectionChanged_1(object sender, EventArgs e)
{
//--This need to fire an event when the selection is done
//dataGridView1_CellClick(sender, e);
if (chartDetailList.Count > 0)
{
//try {
var cellCopy = dataGridView1.CurrentCell;
if(cellCopy != null)
{
if (dataGridView1.CurrentCell.ColumnIndex.ToString() != "" && dataGridView1.CurrentCell.RowIndex.ToString() != "")
{
//set parameters of your event args
var eventArgs = new DataGridViewCellEventArgs(dataGridView1.CurrentCell.ColumnIndex, dataGridView1.CurrentCell.RowIndex);
//or setting the selected cells manually before executing the function
dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[dataGridView1.CurrentCell.ColumnIndex].Selected = true;
dataGridView1_CellClick(sender, eventArgs);
}
}
//}catch(Exception ex)
//{
// MessageBox.Show(ex.Message);
//}
}
}