* DataGrid.cs (EnsureCellVisibility): remove some code to fix a
authorChris Toshok <toshok@novell.com>
Thu, 25 May 2006 19:43:25 +0000 (19:43 -0000)
committerChris Toshok <toshok@novell.com>
Thu, 25 May 2006 19:43:25 +0000 (19:43 -0000)
problem with the last commit.

2006-05-25  Chris Toshok  <toshok@ximian.com>

svn path=/trunk/mcs/; revision=61140

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs

index 0e0cb49af50aecae2dd41269921cb8dc54bd8c1b..6ddc85cb2c955bb9e230108da8059cb966fc60a3 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-25  Chris Toshok  <toshok@ximian.com>
+
+       * DataGrid.cs (EnsureCellVisibility): remove some code to fix a
+       problem with the last commit.
+
 2006-05-25  Chris Toshok  <toshok@ximian.com>
 
        * DataGridTextBoxColumn.cs (ReleaseHostedControl): turns out we do
index 9e880d94c09197af5e9e74b7a48f86a693bb017c..70df1995514e97a08aed7db79e4ccb1c2582b44f 100644 (file)
@@ -1904,16 +1904,10 @@ namespace System.Windows.Forms
                                cell.RowNumber + 1 >= first_visiblerow + visiblerow_count) {
 
                                if (cell.RowNumber + 1 >= first_visiblerow + visiblerow_count) {
-                                       int old_first_visiblerow = first_visiblerow;
-                                       first_visiblerow = 1 + cell.RowNumber - visiblerow_count;
-                                       grid_drawing.UpdateVisibleRowCount ();
-                               }else {
-                                       int old_first_visiblerow = first_visiblerow;
-                                       first_visiblerow = cell.RowNumber;
-                                       grid_drawing.UpdateVisibleRowCount ();
+                                       vert_scrollbar.Value = 1 + cell.RowNumber - visiblerow_count;
+                               } else {
+                                       vert_scrollbar.Value = cell.RowNumber;
                                }
-
-                               vert_scrollbar.Value = first_visiblerow;
                        }
                }