How can I customize category sorting on a PropertyGrid?

前端 未结 4 617
深忆病人
深忆病人 2021-02-07 01:49

How can I customize the sorting of categories in a PropertyGrid?

If I set either of the following...

propertyGrid.PropertySort = PropertySor         


        
4条回答
  •  一整个雨季
    2021-02-07 02:33

    I think this link is useful http://bytes.com/groups/net-c/214456-q-ordering-sorting-category-text-propertygrid

    I don't believe there is a way to do this. The only thing that I could find that indicates you might be able to do this is the PropertySort property. If you set it to none, it says that the properties are displayed in the order that they are received from the type descriptor. You might be able to create a proxy type descriptor between your object and the propertygrid, which would then return not only the properties in the correct order, but the properties with the categories in the order that you want them in...

提交回复
热议问题