code_junkie

Total row count in Gridview using LinqDataSource and paging

Nov 10th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. protected void GridDataSource_Selected(object sender, LinqDataSourceStatusEventArgs e)
  2. {
  3. totalLabel.Text = e.TotalRowCount.ToString();
  4. }
  5.  
  6. protected void LinqDataSource1_Selected(object sender, LinqDataSourceStatusEventArgs e)
  7. {
  8. System.Collections.Generic.List<country> lst = e.Result as System.Collections.Generic.List<country>;
  9. int count = lst.Count;
  10. }
  11.  
  12. protected void LinqDataSource1_Selecting(object sender, LinqDataSourceStatusEventArgs e)
  13. {
  14. System.Collections.Generic.List<country> lst = e.Result as System.Collections.Generic.List<country>;
  15.  
  16. int count = lst.Count;
  17. }
Add Comment
Please, Sign In to add comment