gridview行中的foreach在调试时命中了两次 [英] foreach in gridview row hiting twice while debugging

查看:59
本文介绍了gridview行中的foreach在调试时命中了两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.. !!

Hello every one..!!

foreach (GridViewRow gr in grvCourierBillPassing.Rows)
            {




我已经在goreach gridviewrow循环上面使用过....我在其中保留了一个调试点...可以看到每行被击中了两次...

请帮帮我.. !!

[edit]删除了虚假标签-OriginalGriff [/edit]




i have used above goreach gridviewrow loop ....i have kept a debugging point inside it...it is seen that it is being hit twice for each row...

Kindly help me out..!!

[edit]Spurious tags removed - OriginalGriff[/edit]

推荐答案

假设grvCourierBillPassing是标准的GridView,那么这种可能性很小-我会怀疑您弄错了因为某些原因.如果您说的对所有GridView都是正确的,那么在过去五年左右的时间里就会注意到它.

相反,我怀疑错误在于您的代码在循环内-我们看不到.
Assuming that grvCourierBillPassing is a standard GridView, then that is very unlikely - I would suspect that you are mistaken for some reason. If what you said was true for all GridViews, it would have been noticed in the last five years or so.

Instead, I suspect that the fault lies in your code within the loop - which we can''t see.


在调试时,打开调试窗口调用堆栈"以查看问题所在从.这很容易.

祝你好运,
—SA
While debugging, open the debug window "Call stack" to see where it comes from. This is easy.

Good luck,
—SA


这篇关于gridview行中的foreach在调试时命中了两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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