[Mono-bugs] [Bug 522659] DataGridView does not call PropertyDescriptor.GetValue/SetValue

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 17 19:51:15 EDT 2009


User nsarris79 at hotmail.com added comment

Nikos Sarris <nsarris79 at hotmail.com> changed:

           What    |Removed                     |Added
             Status|NEEDINFO                    |NEW
      Info Provider|nsarris79 at hotmail.com       |

--- Comment #2 from Nikos Sarris <nsarris79 at hotmail.com>  2009-07-17 17:51:04 MDT ---
Created an attachment (id=305968)
 --> (http://bugzilla.novell.com/attachment.cgi?id=305968)

This is a comprehensive example that illustrates the problem.

While coding this I dug deeper into the subject and narrowed the bug:

When a DataGridView has an ITypedList as a datasource it gets the
PropertyDescriptors for it for design (columns etc) BUT is STILL tried to get
the property values from the Properties themselves 

I didn't go into dissasmbly but I BET it uses object.GetProperty(string
propertyname).GetValue(object component, bool caseinsansitive) instead of

Why? because it IS case insensitive. Once a property of the same name is placed
in the object (regardless of case) the value is displayed/set correctly. When
the property is commented out it goes back to null.

Specifically in the example there is a structure of

Each object has an int and two string fields. The PropertyDescriptors are based
on the 3 fields + the child list (which is a field also obviously). When each
field has a property of the same name in the object everything works. As soon
as any of the properties is commented out the according column is null.

I also found another majot bug which is apparent in the example. listaccessors
in ITypedList.GetItemProperties(GetItemProperties) is always null which breaks
parent->child->grandchild currency. I have explained the issue in comments
inside the application (MyCollection.cs,line 145). Should I open another bug
ticket for it or will you attend to it as one issue?

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