private void InitializeDataFiltering(IFWPagination pagination) { _paginator = new FWPaginator(pagination); _sortInfo = new Dictionary <string, FWSortDirection>(); var sortInfo = (pagination as IFWDataOptions).SortInfo; if (sortInfo != null) { foreach (var info in sortInfo) { _sortInfo.Add(info.SortName, info.SortDirection); } } }
public FWPaginator(IFWPagination paginator) { if (paginator != null) { CurrentMin = ((paginator.Page - 1) * paginator.Display) + 1; CurrentMax = CurrentMin + paginator.Display - 1; if (CurrentMax > paginator.Total) { CurrentMax = paginator.Total; } Display = paginator.Display; Page = paginator.Page; Total = paginator.Total; } }