https://bugzilla.novell.com/show_bug.cgi?id=484951


           Summary: Setting DataGridView Rows Visible property to false
                    before Control is Created throws
                    InvalidOperationException
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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

This does not happen on .NET.

Following example code shows the problem:

DataGridView dgv = new DataGridView();
dgv.AllowUserToAddRows = false;

for(int row=0; row<= 2; row++)
if (row >= dgv.RowCount)
{
 dgv.RowCount = row + 1;
 dgv.Rows[dgv.RowCount - 1].Visible = false;            
}
dgv.CreateControl();


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:5524
 
  at System.Windows.Forms.DataGridView.MoveCurrentCell (Int32 x, Int32 y,
Boolean select, Boolean isControl, Boolean isShift, Boolean scroll) [0x00014]
in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6024
 
  at System.Windows.Forms.DataGridView.DoBinding () [0x0026f] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6011
 
  at System.Windows.Forms.DataGridView.ReBind () [0x00018] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6180
 
  at System.Windows.Forms.DataGridView.OnHandleCreated (System.EventArgs e)
[0x00007] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:4027
 
  at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m)
[0x00000] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5759
 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x001e4] in
/home/hindlet/src/monosvn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5397
 
  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:5580
 
  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
 

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to