[Dojo-interest] FilteringTable sort
ibsscott
sallan1000 at aol.com
Tue Feb 27 15:29:14 MST 2007
I finally figured out you need to set maxSortable=[number of columns you set
with sort="asc"]. That seems to fix most of the problem. I would still
like to be able to sort via the key or field values that are not displayed.
I saw there is an attribute called sortusing=function(). Can I use this
somehow to do what I want?
ibsscott wrote:
>
> Tom,
>
> I still think there is some sort of browser related bug.
>
> I put the data in the store in the order I would like it sorted, but even
> if that can't happen, sorting by just the first column should be ok. The
> only difference in my data is the time and field1. For example:
> [
> {Id:"date1:20060101 date2:20060101 time:2020 seqNum:0001",
> date1:"01/01/2006" date2:"01/01/2006" time:"2020" seqNum:"0001"
> field1:"test"},
> {Id:"date1:20060101 date2:20060101 time:2021 seqNum:0001",
> date1:"01/01/2006" date2:"01/01/2006" time:"2021" seqNum:"0001"
> field1:"test"},
> {Id:"date1:20060101 date2:20060101 time:2022 seqNum:0001",
> date1:"01/01/2006" date2:"01/01/2006" time:"2022" seqNum:"0001"
> field1:"1234"},
> {Id:"date1:20060101 date2:20060101 time:2033 seqNum:0001",
> date1:"01/01/2006" date2:"01/01/2006" time:"2033" seqNum:"0001"
> field1:"test"}
> ]
>
> The first column I display in the table is date1. Since all the dates are
> the same for the first column, I would expect nothing to change except
> that only in Firefox, I get them sorted in a strange order.
>
> date1 date2 time field1
> 01/01/2006 01/01/2006 2022 1234
> 01/01/2006 01/01/2006 2021 test
> 01/01/2006 01/01/2006 2020 test
> 01/01/2006 01/01/2006 2033 test
>
>
> Tom Trenka wrote:
>>
>> Sorting is never done on a hidden field, it is only on visible fields;
>> another words the default sort is never on the "value" field of a row.
>>
>> trt
>>
>>
>> ibsscott wrote:
>>>
>>> Firefox on Mac and WIndows is not sorting the data in the table
>>> according to the "Id". However, it is correctly getting sorted with
>>> Safari and IE. My "Id" is a long string made of different fields such
>>> as date+time+sequenceNumber that keeps the data unique and I also want
>>> it sorted by this string. I do not display the "Id" in my table, but I
>>> do display most of the fields in the key. The time column is displayed
>>> out of order. If I do display the "Id" in the table columns, the data
>>> is sorted correctly.
>>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/FilteringTable-sort-tf3298120.html#a9193500
Sent from the Dojo mailing list archive at Nabble.com.
More information about the Dojo-interest
mailing list