[Mono-bugs] [Bug 485313] New: DataGridView: Setting a rows Visible property to false doesn't hide the Row.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Mar 13 16:28:19 EDT 2009
https://bugzilla.novell.com/show_bug.cgi?id=485313
Summary: DataGridView: Setting a rows Visible property to false
doesn't hide the Row.
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: tom_hindle at sil.org
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7)
Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0.7
When a Row is hidden in a DataGridView it is still shown, however clicking on
it throws a InvalidOperationException: cell is not visible.
In .Net the row is hidden.
Sample Code showing the issue:
using System;
using System.Drawing;
using System.Windows.Forms;
public class Form1 : System.Windows.Forms.Form
{
public Form1()
{
this.Load += new EventHandler(Form1_Load);
}
DataGridView m_grid = new DataGridView();
private void Form1_Load(System.Object sender, System.EventArgs e)
{
m_grid.AllowUserToAddRows = false;
m_grid.RowCount = 3;
m_grid.Rows[2].Visible = false;
this.Controls.Add(m_grid);
}
[STAThreadAttribute()]
static void Main()
{
Application.Run(new Form1());
}
}
Reproducible: Always
Steps to Reproduce:
1. Compile and Run Program
2. Click on the Third Row
3.
Actual Results:
System.InvalidOperationException: cell is not visible
at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore (Int32
columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean
validateCurrentCell, Boolean throughMouseClick) [0x002a2] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5535
at System.Windows.Forms.DataGridView.OnMouseDown
(System.Windows.Forms.MouseEventArgs e) [0x00138] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:4319
at System.Windows.Forms.Control.WmLButtonDown (System.Windows.Forms.Message&
m) [0x0004f] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5620
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x00184] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5337
at System.Windows.Forms.DataGridView.WndProc (System.Windows.Forms.Message&
m) [0x00000] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5591
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:234
at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:215
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00085] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:242
Expected Results:
Only Two Rows should be displayed, preventing clicking on the last one.
--
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