Hiding some fields in propertygrid

Grids for WPF Forum

Posted 6 months ago by Ivan Menshikov
Version: 21.1.2
Avatar

Hi!

It is possible to programmatically hide any fields except fields with the list type List<MyItem>

[ReadOnly(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class MyItem: ObservableObjectBase {..

There is a solution?

Comments (1)

Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

There are filtering features that you can use to narrow down the properties that are displayed.  Our "Filters" QuickStart shows an example of that.

You can also go lower-level than that and create a data factory class that inherits TypeDescriptorFactory and set an instance of it to the PropertyGrid.DataFactory property.  The custom class can override the GetPropertyModels method and remove any properties from the base method's results that don't meet the criteria you require.

Either of those kinds of features should work.


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.