It is the
ColumnWidthChanged
event of the
DataGridView
You'll have to filter out this event firing when parent form is resized. Use
ResizeBegin
to set a flag that form is resizing and
ResizeEnd
to reset the flag.
Also you'll have to know which column is being resized by user. Use
MouseDown
event for this.
private void dataGridView_MouseDown(object sender, MouseEventArgs e)
{
for (int i = 0; i < dataGridView.ColumnCount; i++)
{
if (dataGridView.GetColumnDisplayRectangle(i, true).Contains(e.Location))
{
columnBeingResized = dataGridView.Columns[i];
break;
}
}
}