none
How to get next and previous item from list items RRS feed

  • Question

  • Hi,how to get the list item next and previous data.

    Ex:in my list had one column name IMAGES,in this i want get images url that also depends on where condition,

    condition is url="xxxyyyzzurl" now i want to fetch the  next image and previous  of "xxyyzzurl " how can i get this using caml.

    Thanks,

    Madhu.

    Monday, December 17, 2012 7:14 AM

Answers

  • Hi Madhu,

    I don't think you can remove those items from data table using CAML. And you can try to change the CSS styles for/hide those particular items/rows.

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support


    • Edited by Emir Liu Wednesday, December 19, 2012 11:20 AM
    • Marked as answer by Entan MingModerator Wednesday, December 26, 2012 10:36 AM
    Wednesday, December 19, 2012 11:19 AM
  • Hey,

    Create a column which will have unique id and it also the column which will have the image column.

    You can go next and fwd with that unique column :)

    Just a thought.

    And as Emir said it is perfectly correct.


    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"

    Wednesday, December 19, 2012 1:57 PM

All replies

  • It would be better if you can explain the req clearlyon which you require the help.

    If you are getting multiple images in splistitemcollection you can just subtract one to the current index to get the prev image and add one to current index to get the next  listitem

    if you are getting just a single list item substract one from the item id of the current item which would give you the id of prev item & similarly add to get the next item id then used getitembyid to get the listitem


    Best Regards, Ashutosh | SharePoint World

    Monday, December 17, 2012 1:58 PM
  • Hi asutosh,

    my requirement: 

    Here i get multiple images from list this data i kept in to data table, in this data table i need check one image existing(ex:test.jpg) ,if that image exist,i want to get next image of matching image.

    Thanks,

    madhu.

    Monday, December 17, 2012 2:22 PM
  • Hi Madhu,

    I don't think you can remove those items from data table using CAML. And you can try to change the CSS styles for/hide those particular items/rows.

    Thanks & Regards,
    Emir


    Emir Liu
    TechNet Community Support


    • Edited by Emir Liu Wednesday, December 19, 2012 11:20 AM
    • Marked as answer by Entan MingModerator Wednesday, December 26, 2012 10:36 AM
    Wednesday, December 19, 2012 11:19 AM
  • Hey,

    Create a column which will have unique id and it also the column which will have the image column.

    You can go next and fwd with that unique column :)

    Just a thought.

    And as Emir said it is perfectly correct.


    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"

    Wednesday, December 19, 2012 1:57 PM