Accepted answer

your page numbers are disappearing because in the page index changing event (paginarcol()), you are binding exactly one page of data, because of the skip() and take() calls. since the grid is bound with only one page of data, there is no need for page numbers, thus they disappear.

my guess, since you did not post the page_load code, is that you are binding the whole list initially and not using skip() and take() to only get the one page of data. this would actually cause the grid to realize that there are pages of data instead of just one, thus the page numbers appear when the grid is first loaded.

if you want your existing code to actually keep showing the page numbers, then remove this entire line:

list<adeudos> filasadeudos =     

now instead just bind directly to listaadeudos, like this:

gridcol.datasource = listaadeudos;

since your paginarcol() method is updating the grid's page index value, via this line:

gridcol.pageindex = e.newpageindex;

rebinding the grid will take care of the correct page number being selected and all of the page numbers continuing to be displayed.

Related Query