7. Paginated Controls
* Creating Your Own Custom QDataGrid Subclass
<< * Simple QDataRepeater using AJAX-triggered Pagination
|
Back to Main
|
* Simple Table - an alternative to QDataGrid >>
View Source
will open in a new window
Customizing the QDataGrid subclass
All QDataGrids, by default, can be customized by altering the
QDataGrid
custom subclass in
/includes/qform/QDataGrid.inc
. This class extends from the
QDataGridBase
class which is in the QCubed core.
In the subclass, you can feel free to override rendering methods, including
GetPaginatorRowHtml
,
GetHeaderRowHtml
,
GetDataGridRowHtml
and
GetFooterRowHtml
.
In our example below, we have defined a
PaginatorAlternate
(so that we can render 2 paginators for this single datagrid), then set
ShowFooter
to true, and then finally implemented our own custom
GetFooterRowHtml
method (which basically just calls
GetPaginatorRowHtml
with the
PaginatorAlternate
object.
Previous
|
1
|
Next
Results:
Viewing items 1-19 of 19.
Person ID
First Name
Last Name
Previous
|
1
|
Next
Results:
Viewing items 1-19 of 19.
3
Ben
5665564
1
kavita 2
arulyfred
9
Linda
Brady
11
Brett
Carlisle j
4
Mike
Ho
14
sdhgfhsdg
jai
17
good
job
16
Nice
Job
8
Samantha
Jones
12
Jacob
Pratt
2
Kendall2
Publics
13
sdf
sdf
6
Wendy
Smith
5
Alex
Smith
10
Jennifer
Smithfgfg
27
test
test
22
moi
tpo77
15
billy
wilder
7
Karen
Wolfe