seems I can't solve two things about WebGrid.
1- how do I make a WebGrid column unsortable? In my case the
underlying collection is a sorted collection which is not user
2- I stumbled over WebGrid>>rowGreenIfTrue: and friends and I like it
a lot. If a column contains a link (added via >>addBlock) the #bold
argument is ignored. Minor aesthetic issue.
And while I'm at it:
To make the row above the Grid display the selected row in the grid, I
addLinkTo: self observee
text: each positionsText
view: aViewSymbol "This is in a reusable component"
value: each idString].
and in every view I use this component I call:
| selPos selectedId |
selectedId := self session lastRequest queryAt: 'Selected'.
selPos := self observee abrechnung positionen
detect: [:each | each idString = selectedId]
selPos ifNotNil: [self observee selectedPosition: selPos]
And I had to implement idString on the model solely for this purpose.
Is there a way to do this with less code?
Ideally I would like:
addText: each positionsText;
onClick: [self observee selectedPosition: each.
"now automagically update the line above the Grid
with one more line of code"]].
Oops, maybe this is too much to expect?
But I feel I wrote a lot of code to achieve my end. Hopefully this is
mainly a lack of knowledge on my side.
Btw, the capitalised text in the picture is not my idea :-))
Herbert mailto:[hidden email]
Aida mailing list