Re: Sortable tables

Orion Adrian schreef:
>> I see two ways to sort tables with rowspans:
>> 1. For the purpose of sorting, the cells with a rowspan could just be
>> 'expanded' to n separate cells. When they end up next to eachother
>> again, they can be re-combined.
>> 2. The sorting can consider the rowspanned cells to be 'grouped'. That
>> means the rows those cells are in are only moved as a whole. The values
>> inside the group are also sorted. Like 'group by' in SQL.
>>
>> I think solution 2 is the best one.
> My example was the wrong example, but column reordering is also a
> problem. Especially with sorting since it is often useful to reorder
> columns after a sort to put the primary sort key as the first column.
>
> The question is can you produce an algorithm that can intelligently
> determine between 1 and 2 above? There will always be situation now
> where 1 or 2 is the wrong approach. I have yet to find a method that
> clearly indicates where one is a better solution in any given
> situation.
>   
A user agent can just pick one, it doesn’t need to intelligently 
determine anything. Both solutions are reasonable. Maybe a UA can let 
the user pick his one, if it thinks providing such a choice gives more 
value to the product. When the sorting is implemented through 
JavaScript, the website author can determine which method he thinks fits 
his table best.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Tuesday, 30 August 2005 17:52:53 UTC