Re: Structures_DataGrid_Renderer_Pager: showing the page that contains a given entry
| From: | Mark Wiesemann | Date: | Mon, 15 Jan 2007 16:41:10 +0000 |
| Subject: | Re: Structures_DataGrid_Renderer_Pager: showing the page that contains a given entry | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26348@lists.php.net to get a copy of this message | ||
Hi Sylvain,
Sylvain Beucler wrote:
Yeah, that's the main problem: computing the appropriate page means I have to recompute what SDG does, taking into account the sort field, sort order and pager size, which I think SDG should do. I don't so much look for how to program it than how to have my data-display lib do it automagically. Given the versatile nature of SDG I wondered if that value->page# mapping is a wanted feature - I think getting the positionning for a SQL query needs non-trivial rewriting (self-join) or inefficient full-length prescanning; moreover other structures SDG reads from might just not be suitable. On the other hand this would be a nifty addition. If I understand well this is not a wanted feature and users should just manually precompute and set the appropriate page. Too bad!I'm still not sure what your real request is, as your descriptions aren't clear about that. Do you want to have (e.g.) 15 records on every page and additional alphabetic paging links, just like PEAR's account listing works? [1] Or do you "just" want alphabetical paging, e.g. with 13 records beginning with "A" (= first page), then 27 records beginning with "B" (= page 2), ..., then 5 records with "Z" (= last page)? IMO the first variant needs just an additional paging renderer that does the computation. The second variant would be very complex and would require many internal changes in Structures_DataGrid. If both variants are not your idea, then please describe it with some more details or examples. Regards, Mark [1] http://pear.php.net/accounts.php -- http://www.markwiesemann.eu