Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 264 [details]
The attached program was built with both Microsoft Visual Studio 2008 and MonoDevelop 2.4 using version 2.8.1 of the mono libraries. It works fine on Windows using Microsoft's .Net implementation.
1) DataGridView.InvalidateCell() crashes if the provided cell is a column header.
2) DataGridView.GetCellDisplayRectangle() returns an incorrect value if the the provided cell is a column header.
3) VirtualMode is not fully implemented (there's even a [MonoTODO ("VirtualMode is not supported.")] marker on the DataGridView.VirtualMode property) possibly because DataGridView.OnCellValuePushed() is never called anywhere.
The attached sample program demonstrates these problems, although the third problem can't be seen until the first one is fixed.
The attached patch file
Created attachment 265 [details]
This patch fixes the three problems described. It does not remove the mentioned [MonoTODO] marker, however.)
Row header cells may also have problems with DataGridView.InvalidateCell() and DataGridView.GetCellDisplayRectangle(), but the test program and the proposed patch don't touch that part of the code.
Created attachment 334 [details]
This updated patch should handle both column headers and row headers properly in DataGridView.InvalidateCell() and DataGridView.GetCellDisplayRectangle().
Created attachment 339 [details]
This third version of the proposed patch fixes a typo in an exception message introduced by the second version of the patch.
Created attachment 356 [details]
This fourth proposed patch fixes a bug in the row index checking introduced by the third proposed patch. The DataGridView code likes to look at row 0 even when it doesn't exist. This patch considers row indexes invalid only if < -1 (not a column header) or > 0 and beyond valid indexing into rows.
This bug affects both the 2.8 and 2.10 branches.
nice test case :)