public static void Search <T>(this ISupportPaging grid,
                                      IQueryable <T> source,
                                      Func <T, bool> criteria)
        {
            if (!grid.Configured)
            {
                throw new InvalidOperationException(
                          "You have to configure the grid first. Take a look at the configure method");
            }

            PagingCache.Invalidate();
            grid.SetDataSource(First, source.Where(criteria).AsQueryable());
        }
        //

        private static IEnumerable <T> InternalSearch <T>(this ISupportPaging grid, IQueryable <T> dataSource)
        {
            grid.CurrentPage = 0;
            PagingCache.Invalidate();//maybe this is not the best way to go....
            return(grid.GetPage(dataSource));
        }