protected void ctrlSearch_ContentCreated(object sender, FilterEventArgs e) { string searchFilter = string.Empty; string alphaFilter = string.Empty; switch (e.Type) { case FilterType.Search: searchFilter = e.Filter; break; case FilterType.AlphaFilter: alphaFilter = e.Filter; break; } int navigateToPage = e.Page; PaginatedList <ProductForKit> products = ProductForKit.GetAll(ThisCustomer, searchFilter, alphaFilter, DEFAULT_PAGE_SIZE, navigateToPage); ctrlSearch.AllCount = products.TotalCount; ctrlSearch.StartCount = products.StartIndex; ctrlSearch.EndCount = products.EndIndex; ctrlSearch.PageCount = products.TotalPages; ctrlSearch.CurrentPage = products.CurrentPage; Repeater rptProducts = ctrlSearch.FindControl <Repeater>("rptProducts"); rptProducts.DataSource = products; rptProducts.DataBind(); }
private void DoSearch(string searchFilter, string alphaFilter, int page) { PaginatedList <ProductForKit> allProducts = ProductForKit.GetAll(ThisCustomer, alphaFilter, searchFilter, ctrlSearch.CurrentPageSize, page); BindData(allProducts); }