e.TotalRowCount返回负数 [英] e.TotalRowCount returning negative

查看:113
本文介绍了e.TotalRowCount返回负数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我习惯用SqlDataSource或LinqDataSource显示返回的行数,包含的过滤器,执行以下操作



 '  Afficher le compteur  
受保护的 Sub LDsReception_Selected(sender As 对象,e 作为 LinqDataSourceStatusEventArgs)句柄 LDsReception.Selected
bdgCpt.InnerText = e.TotalRowCount
结束 Sub





今天发生了一件奇怪的事情e.TotalRowCount让我回复-1



伯爵在e.Result.Count,所以我没有卡住,但我想知道为什么



Thx

解决方案

< blockquote>你真的没有读过函数规范,它是非常明确的为什么你读它。



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


Hi
I'm used to display the number of returned rows, filters included, with SqlDataSource or LinqDataSource doing the following

' 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

解决方案

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[^]


这篇关于e.TotalRowCount返回负数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆