Page 1 of 1

Datagrid Pagination

Posted: Mon May 23, 2011 5:13 am
by jesse
Is it possible to display a datagrid with Pagination similar to the way this JQUERY DATAGRID works http://www.flexigrid.info/.
If so... Any tips or tutorials on accomplishing this?

Re: Datagrid Pagination

Posted: Thu May 26, 2011 4:50 am
by jesse
Well... I figured it out a basic solution for now. Its not quite pagination but... it will work for now. If anyone has a better solution please do share.

My solution involves writing a simple function that limits the records returned.

Example:

Shown below LimitBegin and LimitEnd in my query allows me to limit the number of row I start from and end from to bring into my datagrid.
I simply add a button that when clicked loads the next group of records. LimitBegin and LimitEnd are global variables that
are automatically set with a simple put command... right now it just increments by 25. Below is the basis of the code:

Code: Select all

 put LimitBegin + 25 into LimitEnd      
      put ("SELECT ID,TITLE FROM products  LIMIT " & LimitBegin &","& LimitEnd) into tSQL
      put LimitEnd into LimitBegin