SHARE
TWEET

Untitled

Ortund Sep 17th, 2014 192 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim dt As DataTable = database.GetData
  2.  
  3. gvItems.DataSource = dt
  4. gvItems.DataBind()
  5.  
  6. Dim pageFrom, pageTo, total As Integer
  7. pageFrom = gvItems.PageSize * gvItems.PageIndex + 1
  8. pageTo = gvItems.PageSize * (gvItems.PageIndex + 1)
  9. total = dt.Rows.Count
  10.  
  11. If pageTo > Total Then
  12.         pageTo = Total
  13. End If
  14.  
  15. lblGridViewData.Text = String.Format("Showing {0} to {1} of {2} entries", pageFrom, pageTo, Total)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top