Monday, July 16, 2007

Flex DataGrid Paging Example with Source

http://therush.wordpress.com/2007/01/06/flex-datagrid-printing/

== quote ==
Many of you have requested the source to my Flex DataGrid paging example. Here it is http://develop.gurufaction.com/src/App.mxml and the example application can be viewed here http://develop.gurufaction.com/App.swf

1 comment:

Matthew said...

Thanks for the code. Here are a copy changes I had to make to get it to work for me.

In the createNavBar() function:

for( var x:uint = 0; x < navSize; x++)
{
var pg:uint = x + set;
if(pg < pages){
navButtons.addItem({label: pg + 1,data: pg});
}else{
break;
}
}
if( pg < pages - 1 )
{
navButtons.addItem({label:">",data:pg + 1});
var endIndex:uint = pages - pageSize;
if(endIndex < 0){
endIndex = pages - navSize;
}
navButtons.addItem({label:">>",data:endIndex});
}