custom action template

A place for users and developers of the Xataface to discuss and receive support.

custom action template

Postby dynamic » Mon Jan 28, 2013 1:27 pm


I define a new action "reports" that use a query and show data in to grid in "list" tab:
$grid = new Dataface_RecordGrid($data);

df_display(array('body'=>$grid->toHtml()), 'Dataface_Main_Template.html');

But this grid don't have the same functionality like the default "list" tab format: sort, filter, record-> cell link etc.
How to show my action query in the default "list" format. Replace Dataface_RecordGrid() class with what ? Can you show me an example ?

Thanks ,

Posts: 3
Joined: Thu Jan 17, 2013 2:35 pm

Re: custom action template

Postby shannah » Tue Jan 29, 2013 9:57 am

The RecordGrid component, while similar to the list view, is not the same - and List view actually doesn't use the RecordGrid at all. Sorting in the list view actually refreshes the page with different sort parameters - and this just won't work with a component that you embed in your own action, without some cooperation of the action itself.

If you only need to sort the rows that are visible in your grid, you might want to use Javascript. There are lots of jQuery plugins for table sorting, and rolling your own isn't that hard.

Steve Hannah
@shannah78 (on twitter) blog
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved