7. Paginated Controls
* Simple QDataRepeater using AJAX-triggered Pagination
<< * Nested QDataGrid
|
Back to Main
|
* Creating Your Own Custom QDataGrid Subclass >>
View Source
will open in a new window
Simple QDataRepeater using AJAX-triggered Pagination
The main difference between a
QDataGrid
and a
QDataRepeater
is that while a
QDataGrid
is in a table and has a lot structure to help define how that table should be rendered, a
QDataRepeater
is basically without structure. You simply specify a template file which will be used to define how you wish each
Person
object to be rendered.
This very simple
QDataRepeater
has a
QPaginator
defined with it, and its
UseAjax
property set to true. With this combination, the user will be able to page through the collection of
Person
items without a page refresh.
Note that because the
QPaginator
is rendered by the
form
(as opposed to the example with
QDataGrid
where the
datagrid
rendered the paginator), we will set the
form
as the paginator's parent.
Also, note that QDataRepeater allows you to set
two
paginators: a
Paginator
and a
PaginatorAlternate
. This is to offer listing pages which have the paginator at the top and at the bottom of the page. The same variables of
$_FORM
,
$_CONTROL
and
$_ITEM
that you would have used with a
QDataGrid
are also available to you in your
QDataRepeater
template file.
Previous
|
1
2
3
4
|
Next
Person #1
First Name:
kavita 2
Last Name:
arulyfred
Person #2
First Name:
Kendall2
Last Name:
Publics
Person #3
First Name:
Ben
Last Name:
5665564
Person #4
First Name:
Mike
Last Name:
Ho
Person #5
First Name:
Alex
Last Name:
Smith
Person #6
First Name:
Wendy
Last Name:
Smith
Previous
|
1
2
3
4
|
Next