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

Reply via email to