set label text to total row count of gridview
Posted
by woolardz
on Stack Overflow
See other posts from Stack Overflow
or by woolardz
Published on 2010-06-03T17:20:24Z
Indexed on
2010/06/03
17:24 UTC
Read the original article
Hit count: 136
I'm using a stored procedure in a sql database as the data source for a SqlDataSourceControl on my .aspx page. I'm then using the SqlDataSourceControl as the data source for a gridview on my page. Paging is set to true on the gridview. What i would like to do is set the text of a label to the total number of rows in the gridview. I can use this code
'labelRowCount.Text = GridView2.Rows.Count & " layers found"
to return the number of results per page, but it doesn't give me the total. I've looked in several places and haven't been successful in finding a solution.
© Stack Overflow or respective owner