Excluding rows in SetColumnAllowAutoSort

Posted by: ngrimm on 8 September 2017, 1:07 pm EST

  • Posted 8 September 2017, 1:07 pm EST


    Is there a way to specify a range of rows/exclude a row using .SetColumnAllowAutoSort(0, 10, True)?  Perhaps there is a way to catch the event triggered when the users clicks the header to sort the column?  If so, maybe we could use .SortRows or .SortRange in that sub while still catching the users 'on the fly' sorting preference. 


    I am using a spread that serves as a record lookup.  The spread always has a blank row at the top, allowing the user to enter search filters.  Double clicking rows, except the top row, selects the record and sends it to the form.  The problem is if the user uses the auto sort the blank row is included in the sort.  If a record is in the first row the doubleclick ignores the first row, as it believes should be the blank search row.  The spread is dynamic in nature, used for multiple table lookups.  We like the option to allow the user to maintain the sorting preferences with the .SetColumnAllowAutoSort.


    Using Version 3.0.2005.2005 with Microsoft Visual Basic 2005


    Thanks!


    Nicole

  • Replied 8 September 2017, 1:07 pm EST

    Nicole,


    You can catch the AutoSortingCOlumn event and set the Cancel parameter to True to keep Spread from its default sorting and programatically sort the Spread as you like.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels