0
I’m trying to make a pagination of a Webgrid using Pagedlist but there is conversion error:
Additional information: Cannot convert type implicitly 'Pagedlist.Pagedlist' in 'System.Collections.Generic.List'
I don’t know if it occurs due to variable dns
be the type List<dynamic>
as shown below:
ViewBag.Columns = columns;
var dns = new List<dynamic>();
dns = Util.DataTableParaDynamic.ConverterDtParaList(dt);
int paginaTamanho = 15;
int paginaNumero = (page);
ViewBag.Total = dns.ToPagedList(paginaNumero, paginaTamanho);
It is not necessary to use Pagedlist I can use any other means that make the pagination and work under these conditions.