Bug for personalized propertygrid in mono

View: New views
2 Messages — Rating Filter:   Alert me  

Bug for personalized propertygrid in mono

by Marcos Gonzalez-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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:
 
 
Thanks,

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list@...
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Re: Bug for personalized propertygrid in mono

by Ivan Zlatev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <marcosjgr@...> 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:
 
 
Thanks,

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list@...
http://lists.ximian.com/mailman/listinfo/mono-winforms-list



_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-list@...
http://lists.ximian.com/mailman/listinfo/mono-winforms-list