I am going to assume that performance is the main factor here and not the method of implementation. Based on that, I would just like to iterate that for server side code you are following the best practices e.g. instead of SPList.Items, use SPList.GetItems(SPQuery query) or enumerating and then paginating for large lists.
MSDN: Handling Large folders and lists
The list item data and version information can be retrieved in code directly using the one SPQuery, example below
SPListItem listItem = // wherever you are getting this from
SPListItemVersionCollection listItemVersions = listItem.Versions;
if (listItemVersions != null && listItemVersions.Count > 0)
{
foreach (SPListItemVersion item in listItemVersions)
{
foreach (SPField field in item.Fields)
{
// Do Something with the data
}
}
}
Thanks, Ransher Singh, MCP, MCTS | Click Vote As Helpful if you think that post is helpful in responding your question click Mark As Answer, if you think that this is your answer for your question.
No comments:
Post a Comment