WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Improved SID Grid Sorting, Martijn Hooimeijer, October 1, 2003
     Re:Improved SID Grid Sorting, Erik Arvidsson, October 1, 2003
     Re:Improved SID Grid Sorting, Martijn Hooimeijer, October 1, 2003

Subject: Re:Improved SID Grid Sorting From: Erik Arvidsson Date: October 1, 2003
Hmmm... maybe you meant Emil. He made the Grid.

Would it not be enough to do?

function compareBySid(d) {
return function n1, n2) {
return (d ? 1 : -1 ) * (n1.sid - n2.sid);
}
}

All these parsing will slow down the comparison. The '-' operator does a number conversion and even if a NaN is encountered the sorting should work.


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