Dev gridcontrol 控件, 某一列Atot的合计值,等于另外两列A1,A2合计值的比值,该如何实现? 10
展开全部
double T = (double.Parse(gridView1.Columns["接收量"].SummaryItem.SummaryValue.ToString()) - double.Parse(gridView1.Columns["不良数量"].SummaryItem.SummaryValue.ToString())) / double.Parse(gridView1.Columns["接收量"].SummaryItem.SummaryValue.ToString()) * 100;
gridView1.Columns["实际良率"].SummaryItem.DisplayFormat = T.ToString("0.00");
gridView1.Columns["实际良率"].SummaryItem.FieldName = "实际良率";
gridView1.Columns["实际良率"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
gridView1.Columns["实际良率"].SummaryItem.DisplayFormat = T.ToString("0.00");
gridView1.Columns["实际良率"].SummaryItem.FieldName = "实际良率";
gridView1.Columns["实际良率"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询