WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Sortable Tables - Sort column according to hidden value (is this case a date), Pete, December 22, 2004
     Re:Sortable Tables - Sort column according to hidden value (is this case a date), Erik Arvidsson, December 31, 2004
         Re:Sortable Tables - Sort column according to hidden value (is this case a date), Pete, January 12, 2005
     Re:Sortable Tables - Sort column according to hidden value (is this case a date) , Guilherme Blanco, December 29, 2004
     Re:Sortable Tables - Sort column according to hidden value (is this case a date), Jeffrey Jangli, December 23, 2004
         Re:Sortable Tables - Sort column according to hidden value (is this case a date), Pete, December 23, 2004
             Re:Sortable Tables - Sort column according to hidden value (is this case a date), Jeffrey Jangli, December 23, 2004

Subject: Re:Sortable Tables - Sort column according to hidden value (is this case a date) From: Pete Date: January 12, 2005

Thanks Erik.

    Your solution worked like a charm.

best

p

From: Erik Arvidsson
Sent: December 31, 2004
Subject: Re:Sortable Tables - Sort column according to hidden value (is this case a date)

Don't hide the column. Either do what Blanco said or use an attribute

<td date="2004-12-31">Dec 31</td>

Then define your own function go get the row value

function getDateFromTr(oTr, nCol)
{
// iso dates are comparable
return oTr.cells[nCol].getAttribute("date");
}

SortableTable.prototype.addSortType("MyDate", null, null, getDateFromTr);


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