Re: Bug for personalized propertygrid in mono

Ivan Zlatev <[email protected]>
Newsgroups gmane.comp.gnome.winforms
Message-ID <[email protected]>
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 -
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx?msg=1422328#xx1422328xx

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
interface.

Kind Regards,

Ivan Zlatev
http://ivanzlatev.com


On Fri, Jul 24, 2009 at 10:17 PM, Marcos Gonzalez <[email protected]>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  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>

_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.