Sort of RecordView - Printable Version +- Curl Global Community (https://communities.curl.com) +-- Forum: Discussions (https://communities.curl.com/forumdisplay.php?fid=1) +--- Forum: General Curl questions (https://communities.curl.com/forumdisplay.php?fid=2) +--- Thread: Sort of RecordView (/showthread.php?tid=652) |
Sort of RecordView - alchimiste - 11-21-2012 Hi, everybody When RecordView is sorted, the specific Record must not be sorted. For example, ---------------------------------------- LOTID | HOLD | RUN | WAIT ---------------------------------------- AAAA | 200 | 100 | 50 BBBB | 300 | 50 | 30 TOTAL | 500 | 150 | 80 ---------------------------------------- the Record of TOTAL must not be sorted and it must be always in the bottom of RecordView. I tried to use RecordSort object but it did not work as I wished. RE: Sort of RecordView - fukuta - 11-21-2012 Which column would you like to sort by? How did you try to do that? It may help if you show us the code we can reproduce the problem. RE: Sort of RecordView - ashimo - 11-21-2012 How about this? Code: {curl 7.0 applet} RE: Sort of RecordView - alchimiste - 11-21-2012 The TOTAL record should not be sorted for all columns. Users want to see the summary record such as TOTAL or AVERAGE. The summary record usually is located in the bottom of RecordView. I'm implementing this for the grid component, modified FastRecordGrid. The source code that I wrote: def rd = rv[rv.size - 1] || rv is RecordView set rv.sort = {proc {r1:Record, r2:Record}:int || I thnk this code is stupid... {if r1 == rd then {return 1}} || the rest of logics is omitted for explanation } |