﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Enhancement Requests  » AutoColumnSort</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 25 May 2026 22:20:04 GMT</lastBuildDate><ttl>20</ttl><item><title>AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23749.aspx</link><description>Guys,&lt;/P&gt;&lt;P&gt;I just switched out my code for sorting on a listview and used the built in capabilities, and suddenly my form takes 4 years to load as the LV control sorts every item over and over everytime there is an addition. Doh!&lt;/P&gt;&lt;P&gt;So, I switch off autocolumnsoft and zoom, done in 2 seconds. So, I am now doing an order by from my proc, but it orders on the second column of the listview, is there any chance of being able to set the column that the sort is done on when the lv control is first drawn?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Geoff.</description><pubDate>Wed, 08 Jul 2009 07:46:54 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23775.aspx</link><description>Actually this sorting logic is being done by the standard .NET ListView.  However, I am not sure why it woulc be firing like this as I have some massive lists that get loaded and I use this feature a lot and have not experienced this.  So I would be curious as to what logic you have going on behind the scenes here.  Not to say that there isn't something that could be done, but I have not experience this slowness as the sort doesn't fire until after the the Requery.  The only other time it fires is when a column header is clicked...so there has to be something going on here.&lt;br&gt;
&lt;br&gt;
Not that it will resolve this issue, but in the 1.7 release you will be able to see the new StrataListView which is a list written from scratch and has native sorting and supports native data types for true sorting.  A sort value can be supplied to every column which doens't have to match the text displayed within the column.  So you can truly sort dates, integers, strings, etc. With this logic you can even make check boxes (which are allowed in any column) or images (which are also allowed in any column) to be sortable.</description><pubDate>Wed, 08 Jul 2009 07:46:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23761.aspx</link><description>Hi Edhy,&lt;/P&gt;&lt;P&gt;I am offering the listview sorting options for my customers benefit, but when the form first appears I would like it to be sorted by column 1. When I turn on AutoColumnSort, it changes the sort to column 0, so any pre-sorting I have done is lost. If I turn on AutoColumnSort before I populate the LV, the form takes a long time to load as there could be a fairly large number of records here.&lt;/P&gt;&lt;P&gt;What I need to be able to do is tell the LV to sort on column 1 rather than 0. Most customers expect to be able to click on column headers and get a sort on that column.&lt;/P&gt;&lt;P&gt;Unless I reinstate all my previous code and do the sorting manually.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Geoff.</description><pubDate>Tue, 07 Jul 2009 02:39:52 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23753.aspx</link><description>Hi,&lt;br&gt;
&lt;br&gt;
Column index start from 0, and in the ListView Sorting properties you have total control on which column you want the ListView to be sorted.&lt;br&gt;
&lt;br&gt;
What I was saying before is that if you have your source BO properly sorted, then you would not need to use the ListView Sorting features as the underline data would be already sorted in any way you wanted and when calling ListView.Requery() it will bring the data already sorted.</description><pubDate>Mon, 06 Jul 2009 14:44:31 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23751.aspx</link><description>Hi Edhy,&lt;/P&gt;&lt;P&gt;Thanks for the response. I have no problem doing the sort, it's just that the listview defaults to sorting on column 0 (or is it 1?) when you turn on AutoColumnSort. In my case I want the sort to be done on column 1 (or is that column 2?). If you could just enter an initial sort column number, that would be as if you had clicked on that columnheader, that is what I need.&lt;/P&gt;&lt;P&gt;Unless there is some really neat way of mimicking the column click event?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Geoff.</description><pubDate>Mon, 06 Jul 2009 14:05:05 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: AutoColumnSort</title><link>http://forum.strataframe.net/FindPost23750.aspx</link><description>Hi Geoff,&lt;br&gt;
&lt;br&gt;
If you are sorting the data on your SP, then in set the ListView.AutoColumnSort = False so it will respect whatever sorting you have at the SP level.&lt;br&gt;
&lt;br&gt;
Also if you are using a BO to populate your ListView, you can also have a Sort condition on the BO and when requery the listview it will load the data already sorted for you.</description><pubDate>Mon, 06 Jul 2009 13:35:49 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>