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
|
Hello, How can I sort a collection in the collection editor based on the value of each item and automatically sort when a new item is added or a value is changed? Thanks Oscar |
|
|
Hi Oscar, The only sorting capabilities provided by the PropertyGrid are at the high level - by setting the Sorting property. You could try create a custom comparer that causes collections to be sorted. In the comparer, you could check Node.Source to check that both comparing objects have the same collection. You can use Node.IndexedPropertyArguments to get the index within that collection for the values that are being compared. I have not tried a full solution to this myself though. If the sorting does not update when items are added, you may need to cause the PropertyGrid to reload unfortunately. Let me know if you have questions as you implement the sorting. -Jason Fauchelle |
|