Re: Can I disable sorting in Structures::Datagrid?

From: Date: Sat, 15 Apr 2006 22:34:49 +0000
Subject: Re: Can I disable sorting in Structures::Datagrid?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23654@lists.php.net to get a copy of this message
Justin Patrin a écrit :
On 4/15/06, dondo <dondo@myway.com> wrote:
Hi, I'm currently re-writing a website to use Pear Structures::DataGrid for rendering my HTML tables. I previously had built my own datagrid-type framework but it has become a mess. It did, however, allow me to specify both an orderBy and a thenBy parameter for sorting, which was done by the database. With DataGrid, I can't seem to get this to work. I can sort the data with both the orderBy and thenBy parameters in the database of course, but then DataGrid re-sorts it by the orderBy parameter (from the $_GET array). Can I somehow tell DataGrid not to sort at all? I've tried hacking the source code a bit but haven't had much luck. I also don't want to disable the header links because I want to be able to sort using them as well.
Hi, I used Datagrid for a project last month and discovered by 'trials and errors' that sorting works well as long as you keep using DataObjects methods. As long as you run the ->query method, sorting does not work. Thierry bothorel

« previous php.pear.general (#23654) next »