Janko Mivšek pravi:
>> I can sort the elements for any column, but not for #id (Matricula). The
>> label above does not appear like the other labels (It's color is black,
>> not blue) . (I attach a screenshot.)
>> It's possible to sort the elements for #id ?
> It is possible to sort columns with links too. Can you send the code
> building that WebGrid? Is id a string or number?
To reveal internals of when sorting works and when not: see the method
WebGrid>>sortLinkColumn: in private-printing. There you can see when the
column name in header appears as an link and when just plain text.
It appers non-sortable when the column is numbered and specially, when
the column content is produced by add blocks.
Remember, for the highest flexibility you can produce a column in a block:
grid column: 5 addBlock: [:rowObject |
WebElement addText: rowObject printString; yourself]
Such addBlock columns are currently not sortable, because they don't
produce text directly, but a WebElement. And it is hard to decide, how
to sort such elements. That's why they are not sortable. We need to
produce some algorithm to make them sortable. Hmm, maybe this can be
Smalltalk Web Application Server
Aida mailing list