Last post Sep 15, 2011 09:41 PM by Decker Dong - MSFT
Sep 13, 2011 08:50 PM|Pavel_147|LINK
In some handler I bind data to GridView gridview1.
Here are my actions:
The number of rows in table1 is 34, but when I check the number of rows in
gridview1, it's equal to 10 (maybe because the
PageSize property is also 10).
it's annoying, because in the handler there is a loop cycle through the rows of
table1, where some property gridview1 row with equal row number is assigned.
Thanks in advance.
Sep 14, 2011 03:36 AM|Prashant Kumar|LINK
You can try this
Sep 15, 2011 09:41 PM|decker dong - msft|LINK
Yes you are right. And it's the reason that because GridView always shows the pagable per page (TotalCount is 10, so you can only get the result).
There are two solutions for you at present to deal with all the data contents:
1) Cancel GridView's PageSize by setting GridView's AllowPaging=False
2) Just handle the DataTable instance, and do: DataTable.Rows.Count or use:
foreach(DataRow row in DataTable.Rows)
row["ColumnName"]; //Get values like this...