SearchDataSource

 
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
  • Per Nergård
    Member since: 2007
     

    You can do it like this:

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

    Br

    Per

    #28248 Feb 27, 2009 14:49