This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, We are investigating the MindScape property grid and found a discrepancy with how the winform proeprty grid works. When editing an object with both custom typedescriptors and custom proeprty descriptors, the GetValue-method of our property descriptor is called with the type descriptor rather than the actual component. This has forced us to add the following code:
And the property descriptor GetValue method now looks like this
The winform property grid seems to do this itself before calling GetValue. Any thoughts on this? /Jonas Oh, using Bold/Italics in the editor doesn't seem to render properly, ** above means start and end of Bold-face |
|
|
Hello Thanks for evaluating our PropertyGrid. To help look into this, could you please post some sample code that shows how you have implemented the object you are editing in the PropertyGrid. Jason Fauchelle |
|
|
I have made a sample project available here: https://www.dropbox.com/s/b6gvzkik5uzij1l/PropGridDemo2.zip It shows multiple issues with the Mindscape property grid: * In SimplePropertyDescriptor.Getvalue, the value that is passed is the type descriptor, not the actual value. * When the model property (Element.Name in this case) does not allow null-values, it is not possible to multi edit it * Properties that require a TypeConverter does not work like in the standard winform property grid. /Jonas |
|
|
Hello Jonas Thanks for the sample project, this has been a great help with understanding your application. We will not be able to change the behavior of calling GetValue in the current version as this could be a breaking change for some customers. One option is to continue using your ResolveComponent technique. Another option would be for your model classes such as Element to implement ICustomTypeDescriptor or extend a class that implements ICustomTypeDescriptor. In this way, when the type descriptor is passed to GetValue, it will in fact be the model instance too. We are unable to change the functionality of the ManyEditor at this stage. Improving this is on our backlog. I've put down a note for improving the TypeConverter support for a future version. Jason Fauchelle |
|