Ticket S170611
Visible to All Users

Core - Pass sorting options from the application model into PropertyCollectionSource

created 12 years ago

Refer to the Sorting in ListView/NestedListView in servermode ticket for a workaround.

Answers approved by DevExpress Support

created 12 years ago (modified 6 years ago)

We have implemented the functionality described in this ticket. It will be included in our next update(s).

Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

Additional information:

We have added the CollectionSourceBase.CanApplySorting property. When it is set to true, sorting options specified in the application model are applied.
In the CollectionSource descendant, the default value of this property is true. In the PropertyCollectionSource descendant the default value is false. This is done to avoid accidental overriding of sorting specified in a collection property getter. You can customize this behavior via a ViewController:

C#
using System; using System.Collections.Generic; using System.Linq; using DevExpress.ExpressApp; namespace YourSolutionName.Module { public class ViewController1: ViewController<ListView> { public ViewController1() { TargetViewNesting = DevExpress.ExpressApp.Nesting.Nested; } protected override void OnActivated() { base.OnActivated(); View.CollectionSource.CanApplySorting = true; } } }

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.