is there an option how to limit the number of results returned? F.e. I have a req where client want to show only 50 of tasks.
Thanks
|
is there an option how to limit the number of results returned? F.e. I have a req where client want to show only 50 of tasks. Thanks |
|||
|
|
|
You can set the List View Threshold on the View definition. In your list just head over to "Modify View" and set how many items you would like to be displayed. |
|||||||||||
|
|
So I ended up with restricting number of results in xslt. I created c# xslt extension function which is responsible for creating navigation with the same structure as oob navigation. In this navigation I restrict render the 'Next' links that can lead user to next page with another results. To user it look like the search reached end but anyway there are still results. I will post my code later because I have to clean naming. |
|||
|
|
|
In your CoreResultsWebPart, you can override the ConfigureDataSourceProperties method like this:
protected override void ConfigureDataSourceProperties()
{
base.ConfigureDataSourceProperties();
CoreResultsDatasource dataSource = this.DataSource as CoreResultsDatasource;
// setting the value to 50 as per your example.
dataSource.ResultsPerPage = 50;
}
|
|||||||
|