[Mono-winforms-list] Bug for personalized propertygrid in mono

Ivan Zlatev contact at i-nz.net
Fri Jul 24 15:41:43 EDT 2009

I am pretty sure that this is a bug in the propertygrid control you are
using. It overrides PropertyGrid.SelectedObject and wraps the object in a
custom one to filter the properties. However it keeps settings the
base.SelectedObject with the same object. The PropertyGrid will not refresh
unless you are setting a different object and I think we have unit tests for
that and that this is the behavior both on MS.NET and Mono. And this comment
confirms what I think -

So you can fix this by changing the source code to set SelectedObject to
null before setting it with the wrapper object to force a reset. Also just
so you know you can also filter the objects properties by using the
BrowsableAttribute and also by implementing the ICustomTypeDescriptor

Kind Regards,

Ivan Zlatev

On Fri, Jul 24, 2009 at 10:17 PM, Marcos Gonzalez <marcosjgr at gmail.com>wrote:

> Hi.
> This is my first post.
> Well I'm working with a personalized propertygrid control in c#, I'm trying
> to hide some properties to the user, everything is well with MS Windows, but
> the problem is when I run it in Linux(Ubuntu8.04 and 9) with mono 1.0 and
> mono 2.0,
> I use a treeview control to show all nodes in the graphic interfaz, and i
> use a personalized propertygrid to filter properties and show the object at
> the user. So the problem is when I clicked one object that has all
> properties filtered (all properties are hidden for the user) and I click
> again to other object in the treeview, the propertygrid doesn't refresh.
> My project work in MS Windows, so I don't know what's wrong in Linux with
> Mono.
> I use this personalized property grid:
> http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
> Thanks,
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090724/b20d34d6/attachment-0001.html 

More information about the Mono-winforms-list mailing list