Datagrid Pagination

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Datagrid Pagination

Post by jesse » Mon May 23, 2011 5:13 am

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?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Re: Datagrid Pagination

Post by jesse » Thu May 26, 2011 4:50 am

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
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Post Reply