Opened 15 years ago

Closed 15 years ago

#2037 closed enhancement (wontfix)

[patch] [need CLA] value sort on FilteringTable

Reported by: [email protected] Owned by: Tom Trenka
Priority: high Milestone: 0.9
Component: Widgets Version: 0.4.1rc1
Keywords: Cc:
Blocked By: Blocking:


I made it so you can sort on the value attribute of a cell rather then the contents if you set the dataType to "value".

Here are the changes I made to FilteringTable?.js:

replace line 374 with:


o.sortType = "value"; always convert to "value"

}else if(sortType.toLowerCase()=="html" sortType.toLowerCase()=="markup"){

replace lines 652 - 653 with:

if(meta.sortType=="value") {

var a = parseInt(dojo.html.getAttribute(rowA.cells[fieldIndex],"value")); var b = parseInt(dojo.html.getAttribute(rowB.cells[fieldIndex],"value"));

} else {

var a =, field); var b =, field);


I have 2 comments about these changes. First, the way this is coded value must be a number. Second, you can still use the "sortusing" attribute to create a custom sort method to sort on the value (as an int).

Change History (5)

comment:1 Changed 15 years ago by [email protected]

I forgot to mention that those line numbers were against the last nightly build (11/28/06) that I downloaded this morning.

comment:2 Changed 15 years ago by alex


first, can you file this as a patch? Secondly, have you sent in a CLA?

comment:3 Changed 15 years ago by [email protected]

where do I file this as a patch? Secondly, what is a CLA and where do I send it?

comment:4 Changed 15 years ago by bill

Owner: changed from bill to Tom Trenka
Summary: value sort on FilteringTable[patch] [need CLA] value sort on FilteringTable

CLA is

Patch is a diff file format, which you can generate from eclipse or tortoiseSvn or (i thin) the command is called "patch" or maybe "svn patch". I don't use the command line.

comment:5 Changed 15 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

This may work for someone but I did not provide for this by design. If you are looking to sort by the keyField of each object, you can always add this code to your own versions--but I don't think it's appropriate here.

A quicker fix would be to simply display the keyField as one of your columns and allow someone to sort on that.

Note: See TracTickets for help on using tickets.