public void UsePageination(int pageSize = 3) { _pageSize = pageSize; _usePagination = true; _currentPage = new TablePage <T>(1, _data.Take(_pageSize)); }
public void UseNoPageination() { _pageSize = 0; _usePagination = false; _currentPage = new TablePage <T>(1, _data); }
/// <summary> /// /// </summary> /// <param name="source">Data source to bind</param> /// <param name="formatter">Entries format template with column names, Tuple.Item1 - column name, Tuple.Item2 - column separator, Tuple.Item3 - column format</param> public BindedTable(IEnumerable <T> source, Func <T, Tuple <string, char, string> > formatter) { _data = source; _formatter = formatter; _currentPage = new TablePage <T>(1, _data); }