November Happy Hour will be moved to Thursday December 5th.

SearchDataSource

Vote:
 
I´m using a SearchDataSource to filter pages during a couple of criterias and a freetextsearch. If I finally binds the SearchDataSource to a grid or a repeater, the correct amount of hits shows. But, I want to put the result in to a PageDataCollection for some reasons. And if I use code like this:
IList list = SearchSource.GetList();
foreach (PageData p in list)
{
 resColl.Add(p);
}
resColl will contain all hits without the earlier filtering. The SearchDataSource control still contains the full resultset. How do I manage the SearchDataSource result?
#28242
Feb 27, 2009 9:30
Vote:
 

You can do it like this:

PageDataCollection pdcFoundPages = (PageDataCollection)SearchDataSource.Select(new DataSourceSelectArguments());

Br

Per

#28248
Feb 27, 2009 14:49
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.