码迷,mamicode.com
首页 > 其他好文 > 详细

DevExpress gridControl 设置分组

时间:2015-10-22 15:41:07      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

有些代码非常有用,但是用的时候就记不清怎么写,所以就在这里打个草稿。

   //设置组汇总
        private void SetSummation()
        {
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "TareWeight", colTareWeight, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "GrossWeight", colGrossWeight, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "MiscDeduction", colMiscDeduction, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "RefGrossWeight", colRefGrossWeight, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "NetWeight", colNetWeight, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "H2O", colH2O, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "H2O2", colH2O2, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "H2OQuantity", colH2OQuantity, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "DryWeight", colDryWeight, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Cu", colCu, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Cu2", colCu2, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Au", colAu, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Au2", colAu2, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "AuQuantity", colAuQuantity, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Ag", colAg, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Ag2", colAg2, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "AgQuantity", colAgQuantity, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Pb", colPb, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Zn", colZn, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Sb", colSb, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Sb2", colSb2, "{0:N3}");

            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Sb", colSb, "{0:N3}");
            this.gridViewShipment.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "Sb2", colSb2, "{0:N3}");

        }

 

DevExpress gridControl 设置分组

标签:

原文地址:http://www.cnblogs.com/yuanjiedao/p/4901147.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!