开发者

Problem showing the DevExpress GridControl Summary total in the footer

开发者 https://www.devze.com 2023-02-24 21:38 出处:网络
I am currently using Visual Studio 2008 with Devexpress 10.2. My sum for some of my columns are not showing up. I set:

I am currently using Visual Studio 2008 with Devexpress 10.2. My sum for some of my columns are not showing up. I set:

color of the groupfooter to Black
gridview.OptionsView.ShowFooter = True
column -> displayFormat = Numberic "c2"
column -> summaryItem.displayFormat = ${0:#,##0.00}
column -> summaryItem.FieldName = column's fieldname
column -> summaryItem.SummaryType = Sum

These s开发者_StackOverflow社区ettings are working on another grid (in a different form) but both this grid and the grid in a different tab (same form) isn't working. I think this happened when I upgraded the DevExpress tools from version 9 though I am not 100% sure that is the cause since the totals are still showing up in different forms.

What approach should I take to force it to create the total? I thought of hardcoding it in a function but that seems too brute force and I wasn't sure which Event I should use to call the function.

SOLVED:

Change the column's UnboundType to the data's datatype. In this case I changed the datatype to decimal.


Hy Kyra,

Please make certain that the column is bound to a numeric field whose sum is possible to calculate. For testing purpose try to change the summaryItem.SummaryType to the Count value and check how it works. Do you see the summary in this case? Also, please make certain that you are not restoring the previously saved layout where this summary is not defined. Perhaps, this is the cause of the problem...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号