在textedit devexpress中获取gridcontrol列的总数 [英] Getting totals of gridcontrol column in a textedit devexpress
本文介绍了在textedit devexpress中获取gridcontrol列的总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在尝试从Gridcontrol列中获取devexpress textedit控件中的总计值的代码。它显示总数但总价值不正确。
问题出现在这里
(GridView1.Columns .View.GetFocusedRowCellValue(NET PRFIT,I))
有谁能帮我解决这个问题?谢谢。
我的尝试:
结束 尝试
Dim solprofit 作为 Double = 0
Dim retproft As Double = 0
对于我 As 整数 = 0 GridView1.RowCount - 1
尝试
solprofit = solprofit + CDbl (GridView1.Columns.View.GetFocusedRowCellValue( NET PRFIT,I))
Catch ex 作为例外
结束 尝试
下一步
TxtOpCrTotal.Text = FormatNumber(solprofit)
解决方案
这些可能就是你要找的:
* 在线文档 - Developer Express Inc. [ ^ ]
* Q537682 - 如何得到一个GridView列的总和DevExpress支持中心 [ ^ ]
Hi all,
I am trying the code to get values of totals in a devexpress textedit control from a Gridcontrol Column. It is showing the total but total value is not correct.
Problem is appearing here
(GridView1.Columns.View.GetFocusedRowCellValue("NET PRFIT", I))
Can anyone please help me for the solution? Thanks.
What I have tried:
End Try
Dim solprofit As Double = 0
Dim retproft As Double = 0
For I As Integer = 0 To GridView1.RowCount - 1
Try
solprofit = solprofit + CDbl(GridView1.Columns.View.GetFocusedRowCellValue("NET PRFIT", I))
Catch ex As Exception
End Try
Next
TxtOpCrTotal.Text = FormatNumber(solprofit)
解决方案
These might be what you are looking for:
* Online Documentation - Developer Express Inc.[^]
* Q537682 - How to get a sum of a GridView column | DevExpress Support Center[^]
这篇关于在textedit devexpress中获取gridcontrol列的总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文