Click here to Skip to main content
15,065,044 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I'm used to display the number of returned rows, filters included, with SqlDataSource or LinqDataSource doing the following

VB
' Afficher le compteur
Protected Sub LDsReception_Selected(sender As Object, e As LinqDataSourceStatusEventArgs) Handles LDsReception.Selected
    bdgCpt.InnerText = e.TotalRowCount
End Sub


It happened to me a strange thing today e.TotalRowCount returning me -1

Count is in e.Result.Count, so I'm not stuck but I would like to know why

Thx
Posted

1 solution

Don't you actually read the function specification it's quite explicit why you get it read it.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatasourcestatuseventargs.totalrowcount%28v=vs.110%29.aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900