How to Sequence?

Grids for WPF Forum

Posted 11 years ago by lik
Version: 13.2.0591
Avatar

I want to know how to sequence in PropertyGrid.

Such as Property Editors in Actipro WPF Controls Sample Browser,I want to move Color to the upper of the Boolen.

Whether can I get a DEMO?

Comments (5)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, please take a look at our Sorting QuickStart.  It shows how you can sort categories and properties within the categories.


Actipro Software Support

Posted 11 years ago by lik
Avatar

Sorry,I do not use SelectedObject.My Project just likes Property Editors in Actipro WPF Controls Sample Browser.

<propgrid:PropertyGrid x:Name="propGrid">

    <propgrid:PropertyGrid.Items>

        <propgrid:PropertyGridCategoryItem DisplayName="Color">

            <propgrid:PropertyGridPropertyItem DisplayName="TextBox"/>

             <propgrid:PropertyGridPropertyItem DisplayName="ComboBox"/>

        </propgrid:PropertyGridCategoryItem>

    </propgrid:PropertyGrid.Items>

</propgrid:PropertyGrid>

I want that TextBox is above in ComboBox,but now I can't.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I believe you need to set a PropertyGrid.SortComparer value.  If one isn't set, I think it falls back to sorting by property name.


Actipro Software Support

Posted 11 years ago by lik
Avatar

How to realize sorting in Property Editors of Actipro WPF Controls Sample Browser.I do not know how to add a PropertyGrid.SortComparer value in this example.Can I get a DEMO or a Solution to realize my needing.

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

As mentioned above the "Sorting" QuickStart shows an example of setting the PropertyGrid.SortComparer property with an IComparer.  You should be able to do that in your case as well and modify the comparer's logic to suit your needs.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.