[Mono-bugs] [Bug 482133] Setting RowCount on DataGridView to reduce number of rows, fails to reduce rows correctly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 4 18:47:46 EST 2009


User tom_hindle at sil.org added comment

--- Comment #1 from tom hindle <tom_hindle at sil.org>  2009-03-04 16:47:45 MST ---
Something else which may be relevant to this change. On further testing I found
that now I could delete rows from visible grids, If I did so on a grid with
more rows than screen size (causing DataGridView::first_row_index to be set)
Delete rows throw an exception.

I think DataGridView member var first_row_index possibly needs to be updated
when deleting Rows.

I added the following to DataGridView::OnRowsRemovedInternal()

if (first_row_index >= Rows.Count)
    first_row_index = Rows.Count -1;

just above validate.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list