I have the following code to achieve a rowcount for my gridview
protected void OnPageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
protected void OnDataBound(object sender, EventArgs e)
{
lblTotal.Text = "Total Rows: " + (GridView1.DataSource as DataTable).Rows.Count;
}
But what I am trying to achieve is for the row count to show something like the below, when using paging in the Gridview:
1 to 10 of 15 Records
Is there anyone who could help me expand this code.
Many thanks and much appreciated for any assistance.