+2009-06-16 Ivan N. Zlatev <contact@i-nz.net>
+
+ * DataGridView.cs: Suppress invalidation during data binding.
+ [Fixes part of bug #512807]
+
2009-06-15 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* PrintPreviewDialog.cs: Tune the navigation among the buttons and
if (rowIndex < 0 || rowIndex >= rows.Count)
throw new ArgumentOutOfRangeException ("Row index is out of range.");
- Invalidate (GetCellDisplayRectangle (columnIndex, rowIndex, true));
+ if (!is_binding)
+ Invalidate (GetCellDisplayRectangle (columnIndex, rowIndex, true));
}
public void InvalidateColumn (int columnIndex)
if (columnIndex < 0 || columnIndex >= columns.Count)
throw new ArgumentOutOfRangeException ("Column index is out of range.");
- Invalidate (GetColumnDisplayRectangle (columnIndex, true));
+ if (!is_binding)
+ Invalidate (GetColumnDisplayRectangle (columnIndex, true));
}
public void InvalidateRow (int rowIndex)
if (rowIndex < 0 || rowIndex >= rows.Count)
throw new ArgumentOutOfRangeException ("Row index is out of range.");
- Invalidate (GetRowDisplayRectangle (rowIndex, true));
+ if (!is_binding)
+ Invalidate (GetRowDisplayRectangle (rowIndex, true));
}
public virtual void NotifyCurrentCellDirty (bool dirty) {
}
PrepareEditingRow (false, true);
- PerformLayout();
- Invalidate ();
}
private void MoveCurrentCell (int x, int y, bool select, bool isControl, bool isShift, bool scroll)
private void ReBind ()
{
if (!is_binding) {
+ SuspendLayout ();
+
is_binding = true;
ClearBinding ();
DoBinding ();
is_binding = false;
+
+ ResumeLayout (true);
+ Invalidate ();
}
}