[Mono-bugs] [Bug 506796] New: bug with DataGridViewBand.DefaultHeaderCellType

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 25 05:25:30 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=506796


           Summary: bug with DataGridViewBand.DefaultHeaderCellType
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: p.ricca at odyssee-ingenierie.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


This bug is situated at
Managed.Windows.Forms/System.Windows.Forms/DataGridViewBand.cs .

This piece of code seems to contain a bug : 
                [Browsable (false)]
                public Type DefaultHeaderCellType {
                        get { return defaultHeaderCellType; }
                        set {
                                if
(value.IsSubclassOf(typeof(DataGridViewHeaderCell))) {
                                        throw new ArgumentException("Type is
not DataGridViewHeaderCell or a derived type.");
                                }
                                defaultHeaderCellType = value;
                        }
                }

Indeed, the condition should be like this : 
if (! value.IsSubclassOf(typeof(DataGridViewHeaderCell))) {

I tested this piece of code under the Microsoft's .NET runtime  and Mono :
test.DefaultHeaderCellType = GetType(DataGridViewColumnHeaderCell)
No probleme under Microsoft's .NET runtime, whereas Mono throws this exception
: 
"Type is not DataGridViewHeaderCell or a derived type."

And this piece of code :
test.DefaultHeaderCellType = GetType(Integer) 'Integer or an other type should
be the same
Is accepted by Mono and MS's .NET runtime throws an exception

Thank you in advance

-- 
Configure bugmail: http://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