Excluding rows in SetColumnAllowAutoSort

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

  • Posted 8 September 2017, 1:07 pm EST

    <FONT size=2>

    Is there a way to specify a range of rows/exclude a row using .SetColumnAllowAutoSort(0, 10, </FONT><FONT color=#0000ff size=2>True</FONT><FONT size=2>)?  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. </FONT>

    <FONT size=2>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.</FONT>

    <FONT size=2>Using Version 3.0.2005.2005 with Microsoft Visual Basic 2005</FONT>

    <FONT size=2>Thanks!</FONT>

    <FONT size=2>Nicole

  • Replied 8 September 2017, 1:07 pm EST


    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