public class cvsearch : CoreResultsWebPart
{
protected override XPathNavigator GetXPathNavigator(string viewPath)
{
QueryManager queryManager = SharedQueryManager.GetInstance(Page).QueryManager;
queryManager[0].ItemsPerPage = 100;
XmlDocument xmlDocument = queryManager.GetResults(queryManager[0]);
return xmlDocument.CreateNavigator();
}
}
All things SharePoint! This blog specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices
How to override Core Results Web Part's limit of 50 results per page?
By default "Core Results Web Part" can result a maximum of 50 results. But grouping results require as many items as per requirement. To achieve this, we need to create our own CoreResults Web Part. The following code snippet help to achieve that.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment