C1TrueDBGrid列页脚错误"输入字符串格式不正确"

时间:2018-05-04 01:07:25

标签: c# visual-studio componentone

//文本框/插入代码

       dg.AllowAddNew = true;
       dg.MoveLast();
       this.dg.Row = this.dg.Row + 1;
       this.dg.Select();
       dg.Columns[0].Text = a;

       dg.Columns[1].Text = b;
       dg.UpdateData();

//页脚代码

        int a = 0;
        double sum = 0;
        for (a = 0; a <= this.dg.Splits[0].Rows.Count - 1; a++)
        {
            sum += Convert.ToDouble(this.dg.Columns["AMOUNT"].CellValue(a));
        }
        this.dg.Columns["AMOUNT"].FooterText = sum.ToString("n");

//它适用于其他c1网格,不知道为什么这个网格没有

1 个答案:

答案 0 :(得分:0)

TrueDbGrid.Columns(“ Amount”)。FooterText = FormatNumber(0.0,2,TriState.True,TriState.False,TriState.False).ToString