WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 How to exclude characters when sorting columns?, Ron B, June 21, 2004
     Re:How to exclude characters when sorting columns?, Erik Arvidsson, July 19, 2004
         Re:How to exclude characters when sorting columns?, Ron B, July 26, 2004
     Re:How to exclude characters when sorting columns? , Ron B, June 23, 2004
     Re:How to exclude characters when sorting columns?, Ron B, June 21, 2004
         Re:How to exclude characters when sorting columns?, Ron B, July 5, 2004

Subject: Re:How to exclude characters when sorting columns? From: Ron B Date: July 26, 2004

Okay, great. Sounds pretty easy... will have a look at it.

Thanks for the reply, Erik!

Ron

From: Erik Arvidsson
Sent: July 19, 2004
Subject: Re:How to exclude characters when sorting columns?

You should create your own custom sort type. Take a look at http://webfx.eae.net/dhtml/sortabletable/customsorttypedemo.html and the external js files.

Something like:

function getMyValue( s )
{
return parseFloat( n );
}

SortableTable.prototype.addSortType( "MySort", getMyValue );

You might also want to use the other arguments to addSortType to get more control but looking at your code it seems like parseFloat is sufficient.

erik





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX