2 Replies Latest reply on Sep 8, 2009 2:44 AM by sagisid

    problem during pagination

    sagisid Level 1

      i have 3 items. there are 2 items on one page. each item is a custom item renderer with description and a button.

      when i load the application first 2 items get loaded correctly. even wen i click the button it works.

       

      but when i click "next" button, the 3rd items can be seen but cannot be selected. clicking on its button has no effect.

       

      what could be the problem ?

        • 1. Re: problem during pagination
          SrinivasAnnam Adobe Employee

          Hi,

           

              Which component are you using to display this paged data?

           

              Can you send us the code for the item renderer and "Next" button.

           

          Thanks,

          Srinivas Annam

          http://srinivasannam.wordpress.com

          • 2. Re: problem during pagination
            sagisid Level 1

            i am using DataGrid. in which only one column is visible and my customItemRenderer is imported using <local:>

             

            one more thing.

             

            this new page contains 1 item. when i click next, the page gets reloaded and then "details" button is getting clicked. i am using a custom eventHandler

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

             

            private function detail_OnClick(ev:DetailEvent):

            void

            {

             

             

            if

            ( arrPageData.length == 1 )

            {

            itemGrid.selectedIndex = 0;

             

            }

             

             

            else

            itemGrid.selectedItem = ListOfItems.item.(ItemID == ev.ItemObject.ItemID )[0];

             

            //ev.ItemObject;

             

             

            gridCanvas.visible =

             

            false

            ;

            viewStack.selectedChild = tabCanvas;

            tabOfferHistory.enabled =

             

            false

            ;

            panelBidIt.visible =

             

            true

            ;

            panelBidIt.enabled =

             

            true

            ;

            tabNav.selectedIndex=0;

            resetOfferHistory();

            }

             

             

             

            private function btnPrev_OnClick():

            void

            {

             

             

            if

            (pageNumber<=0)

            {

            Alert.show(

             

            "This is the first page!"

            );

            }

             

             

            else

            {

            pageNumber-=1;

            }

             

            setGridData();

            }

             

             

             

            private function btnNext_OnClick():

            void

            {

             

             

            var

            iLen:int=arrCompleteData.length;

             

             

            if

            (((pageNumber+1)*ITEMS_PER_PAGE)>=iLen)

            {

            Alert.show(

             

            "This is the last page!"

            );

            }

             

             

            else

            {

            pageNumber+=1;

            }

             

            setGridData();

            }