locked
Solutions how to create a iterator RRS feed

  • Question

  • User1906504752 posted

    I would like to create a previous button and a nex button

    Let us say athat Iam inside of a ITEM(with a specific itemid) How can I get the previous itemid and the next itemid??

    is it possible to do with SQL Query??

     

    Sunday, October 5, 2008 2:29 PM

Answers

  • User2130758966 posted

     If you have a dataobject class you can do a select with an orderby clause and then put each row into your data object class and put that into a list<> class and then you will be able to use the list<> iterator to go back one.

    If your itemid's are consecutive then you could always just add or minus one off. If you have the possiblity of deleting items then this might not work so you would have to test it with a select and if it returns 0 rows then you would need to try taking another one off the id and selecting again etc..

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, October 5, 2008 4:55 PM