KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Design of ListView Sorting
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Thu Jun 05, 2003 8:55 pm    Post subject: Reply with quote

Well, when I don't format the size, it returns as LONG. When I use FormatNumber, it returns as STRING.

I wonder if the problem is FormatNumber()?
Back to top
View user's profile Send private message MSN Messenger
Chris S.
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 05 Mar 2003
Posts: 241

PostPosted: Thu Jun 05, 2003 8:59 pm    Post subject: Reply with quote

This seemed to help...

Code:
$Item.SubItems(1).Text = FormatNumber(CDBl($sSubFldr.Size),0)

...and...
Code:
$Item.SubItems(1).Text = FormatNumber(CDBl($sFile.Size),0)
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Jun 05, 2003 11:43 pm    Post subject: Reply with quote

Got your im thanks. Down to two strategies here. Sorting from the column object and sorting from the listview object:

The columns object strategy, say you wanted to sort the first column in ascending order (the default) then the second column decending, would look like this:

$ListView.Columns(0).Sort
$ListView.Columns(1).Sort(1)

Using the listview object strategy, to do the same thing, would look like this:

$ListView.SortKey = 0
$ListView.Sort

$ListView.SortKey = 1
$ListView.SortOrder = 1
$ListView.Sort

or I guess, just screw the sort properties, and have a sort method that takes parameters, ie: Sort(Column, Order), example:

$ListView.Sort(0)
$ListView.Sort(1,1)

still debating the readability, intuitiveness and workability of all these methods, comments most welcome.

-Shawn
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Fri Jun 06, 2003 1:32 am    Post subject: Reply with quote

Since KixForms is semi-modeled after .NET, is this a property or a method in .NET?

The method appears to be smaller code, but you might lose some of the readability that you have with properies.

I like smaller code but readability is important.

Did I muddy the waters?

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Jun 06, 2003 1:10 pm    Post subject: Reply with quote

ja - know exactly what you mean Kelly. THe properties add somewaht to readability. Plus there would be an added benefit of having the SortOrder, SortKey properties (btw, this is the ActiveX vb way, not dotnet) ... when a user clicks on a column header and "manually" sorts a column. The SortKey and SortOrder properties could be "tested" in code, by the script, and could determine the "current state of affairs" with the ListView (ie, what column was sorted last, and in what order).
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri Jun 06, 2003 5:19 pm    Post subject: Reply with quote

kelly, did you get email ? any luck ?
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Fri Jun 06, 2003 6:12 pm    Post subject: Reply with quote

That is my home email in my profile. You can send it to the other email address, work, I have sent you stuff from or wait till tonight and I will look at it at home.
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
masken
KiXforms Enthusiast
KiXforms Enthusiast


Joined: 14 Mar 2003
Posts: 202
Location: Gothenburg, Sweden

PostPosted: Tue Jul 01, 2003 9:15 am    Post subject: Reply with quote

I just thought of one thing that could be useful - disable the re-sorting of listviews. Why? Well if you have an array that you'd like to be editable, and you put the array into a listview for editing, and when done REDIM the values back to the array, one sometimes might not want the values to have been re-sorted just because the user might have clicked on one of the "column buttons". Ie; a listview where the column headers aren't clickable, or aren't buttons.

Quite a low-prio thing I guess, since it (perhaps) could be solved with numbering in the array or in the listview...
Back to top
View user's profile Send private message MSN Messenger
Bonji
KiXforms Aficionado
KiXforms Aficionado


Joined: 10 Mar 2003
Posts: 393
Location: Virginia

PostPosted: Fri Nov 26, 2004 8:04 pm    Post subject: Reply with quote

Any progress on this one? I could use a multi-column sort, and noticed this train of thought could get that done.

Thanks!

_________________
-Ben
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sun Nov 28, 2004 12:57 pm    Post subject: Reply with quote

Ben,

I am currently building the sort feature into the GridView ... one can click on a the column header to sort it, or use the sort method, right now, it looks something like this:

$GridView.Sort(column, order)

Got any other ideas ?
Back to top
View user's profile Send private message
Sealeopard
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 436
Location: Boston, MA

PostPosted: Sun Nov 28, 2004 1:49 pm    Post subject: Reply with quote

Optional visial indicator denoting whether a column is being sorted ascending or descending.
Property/method to determine which column has been sorterd and which way, e.g. via trinary value, -1=DESC, 0=unsorted, 1=ASC

_________________
Jens

'There are two kinds of vessels, submarines and targets.'
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Sun Nov 28, 2004 5:10 pm    Post subject: Reply with quote

if possible, make this (Jens' suggestion) also 'iconable'.
Optional icon for ascending, descending and unsorted choosable, ya know.
Think Listview needs this too Rolling Eyes

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sun Nov 28, 2004 5:56 pm    Post subject: Reply with quote

Im adding the sort icon feature based on Jen's recommendation ... what i was doing (before I read your idea), was "pluggin-in" the Kixforms BUILTIN icon list into the GridView header ... so one can select any icon from that list.

-Shawn
Back to top
View user's profile Send private message
Les
KiXforms Aficionado
KiXforms Aficionado


Joined: 24 Dec 2003
Posts: 317

PostPosted: Sun Nov 28, 2004 7:14 pm    Post subject: Reply with quote

Eh, this sort tri-state thingy... Unsorted, Ascending, Decending...

Assuming that if one were to click on the header, it would alternate (cycle thru all 3).

I find often in apps, once a column is clicked, it is impossible to then revert to unsorted, meaning that you are stuck with Ascending, Decending, Ascending, Decending...

_________________
The Repro Man
Stealing for a living!
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sun Nov 28, 2004 7:30 pm    Post subject: Reply with quote

ja, the trinay value might be a little tough to implement. right now gridview works just as Les specified (cycles through Ascending, Decending, Ascending, Decending...)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group