Using a propertyGrid in C# Winforms to store infor

2019-08-10 06:58发布

Could anyone help me out on something that is confusing. I'm trying to create a grid to store information for example document details: (name, type, summary as example headers).

When the summary is too large for the cell of the grid I would like to have a button that would open a new control where the user is able to view more information.

Is it possible to to this using a propertyGrid and would anyone be able to point me in the right direction on information on doing this?

I was thinking it might be a case of writing a surrogate class and expose the objects created on it?

Thanks

1条回答
相关推荐>>
2楼-- · 2019-08-10 07:30

Yes it is posible.

You should create your own type that will provide document details as a set of type properties. You should then attach an instance of this type to the PropertyGrid. You can use attributes to change property visibility, editor, description and the others beheviours.

See Getting the Most Out of the .NET Framework PropertyGrid Control for further details.

查看更多
登录 后发表回答