1 Reply Latest reply on Sep 1, 2011 9:25 AM by ejuergensen

    Datagrid Paging w/ FB4.5 & CF causing indexing error


      Being relatively new to this, I am attempting to use the built in (or implicit) data paging tools in Flash Builder 4.5.  Having created the ColdFusion functions necessary I am getting a DataGrid that pages properly with one exception:


      When scrolling down using the down arrow, as the control attempts to grab the second set of records an index out of range error is thrown.  I can see through the network monitor that the parameters passed to the paging method include 0 for the index.  I suspect this error occurs because ColdFusion arrays are not 0 based.


      When using the thumb of the bar and going past the first new 'page', all works great.




        • 1. Re: Datagrid Paging w/ FB4.5 & CF causing indexing error
          ejuergensen Level 1

          Well, the issue was a little different than I suspected.


          What is happening is that the first request is being sent to the method with arguments 0 and 'pagingNumber (20 in my case)'....even though the first 20 are already loaded into the grid   This is causing and end result of the grid deciding that there are only 20 records despite the return of the Count().


          I worked around this by adding 20 to the variable in the Cold Fusion code...maybe this is what I was suppose to do all along?