your page numbers are disappearing because in the page index changing event (
paginarcol()), you are binding exactly one page of data, because of the
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
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;
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.
- I can't get pagination to show up in every page on a GridView with a list as source
- LINQ statement to get every recipe with list of ingridients
- LINQ with subselect and groupby to get only the latest version of each item in a list
- Using LINQ to Get Sum/ Average of a List with custom objects
- How to get top N elements of a list with LinQ?
- Compare id's of objects in two lists and get the list of objects that includes objects with ids occurring in both of them
- C# - Linq optimize code with List and Where clause
- How can I get data from a list with a where clause to another list?
- How do I get the Nth largest element from a list with duplicates, using LINQ?
- How to get list of an entity with generic search
- Get list with condition on sub list
- Using linq group by to get from a list of objects with a DateTime property to a list with an interval StartDate, EndDate
- LINQ get find all with id in list
- Using linq to get list of web controls of certain type in a web page
- How to get Sum from List in another List as a property with linq
- using where to get every other number starting with the last
- Linq to get List with most elements and biggest diff inside it's elements from a List<List<int>>
- Get the objects with the maximum value for a specific property from a list using LINQ
- Get list of objects with unique combination of id/values
- Get MAX 5 items from a grouped List with LINQ and C#
- Get a list of all aliases and union with name
- C# get every n-th element with WHERE, strange result
- Linq query with select needed to get specific properties from a list
- How to get List of results from list of ID values with LINQ to SQL?
- Get List of Elements in Tree with specific Field Value
- Get all values of List with its nested list properties
- How to get all Objects from a List in a List with LINQ
- Get list of object with matching property
- Get the number from list using LINQ with specific conditions
- How to get list of keys in a dictionary with group by value with using LinQ
More Query from same tag
- Compare 2 Properties of equals object
- Roslyn analyser: Nullable annotations in Linq
- Generate a two dimensional array via LINQ
- C# method call delegation
- How do you sort a collection by something other than its own properties?
- LINQ child records null
- OrderByDescending in lambdaExpression is not accepting parameters
- MonoTouch & LINQ - Operation is not valid due to the current state of the object
- Uploading images in the database via WCF
- Shuffled Combination of multiple List<int>
- What's the meaning of the angle brackets on LINQ methods in Intellisense? (Contains<>, Count<>, Distinct<>, etc.)
- Any in-built method to only know if two lists are different?
- Force linq sum to return null
- How to count distinct
- How to dynamically choose two fields from a Linq query as a result
- Calculation on List<> subset with Linq Skip and Take
- Good table editor for MS SQL Server?
- Filtering in Linq with where condition
- Which O/RM tool supports Microsofts Access?
- Linq order by property, then by original order
- How do you flatten a Linq query after using double grouping?
- LINQ to Entities conditionals give weird results
- C# collection indexed by property?
- IQueryable Select returns 0 records
- Creating objects in C# out of XML using LINQ
- Linq + SQLite + Take() == Problem
- How to get Name-property from 'Class' by ClassId from 'Table1' using LinQ?
- LightSwitch PreprocessQuery not filtering
- How to write Linq depending if a value is provided or not
- LINQ Expression in dataset