Skip to main content

Sorting

Comments

1 comment

  • Dapfor Team

    Hello,

    You can easily do it by implementing the ICustomSort interface:

    class CustomSort : ICustomSort 
    {
    public int Compare(Row row1, Row row2, string fieldId, object value1, object value2, int defaultResult)
    {
    //disable sorting
    return 0;
    }
    }

    //The following line disables sorting:
    grid.CustomSort = new CustomSort();

    //The following one enables it:
    grid.CustomSort = null;

     

    For performance reasons it will be better to enable sorting. Look for more details here: http://www.dapfor.com/en/net-suite/net-grid/features/real-time-data-sorting.
    Did you see docked rows feature. It can be useful if you want to keep rows in specified place:
    http://www.dapfor.com/en/net-suite/net-grid/features/row-docking

    Best regards,
    Dapfor

    0

Please sign in to leave a comment.

Powered by Zendesk