Re: Structures/Datagrid - sorting on field prior to display with csv data source?
| From: | Olivier Guilyardi | Date: | Thu, 28 Dec 2006 16:12:04 +0000 |
| Subject: | Re: Structures/Datagrid - sorting on field prior to display with csv data source? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26221@lists.php.net to get a copy of this message | ||
Hi Scottz
One very minor problem for me is that the column being sorted on isn't being tracked. For example, I'm sorting on my first column using setDefaultSort with ASC. This is called prior to the bind. Calling it after the bind and before the render wouldn't work. When the page is rendered the table is sorted correctly. If I click on the header for my first column, it will refresh the page with what I beleive is another ASC sort. It doesn't swith to DESC. You need to click twice on the column for it to switch direction in this case.I can't reproduce this behaviour. I tried with the example you provide. It works fine under both PHP4 and PHP5.
Second issue is I can't get DESC to work. It isn't a major problem for me as I need ASC, but I wanted to test things out to make sure I have done things correctly.With your example I can sort in both directions. Please ensure that you are using the latest versions of: - Structures_DataGrid - Structures_DataGrid_DataSource_Array - Structures_DataGrid_DataSource_CSV - Structures_DataGrid_Renderer_HTMLTable Regards, -- Olivier