📜  如何在asp.net中减去两行asp ne gridview - C#代码示例

📅  最后修改于: 2022-03-11 14:49:05.056000             🧑  作者: Mango

代码示例2
private void BtnAdd_Click(object sender, EventArgs e)
       {

             GrdServiceInsurance.DataSource = ServiceInsuranceList;
                for (int i = 0; i < GrdServiceInsurance.Rows.Count; ++i)
                {
 GrdServiceInsurance.Rows[i].Cells["Total"].Value =(Convert.ToInt32( GrdServiceInsurance.Rows[i].Cells["Cost"].Value.ToString())) -(Convert.ToInt32( GrdServiceInsurance.Rows[i].Cells["InsuranceCost"].Value.ToString())) 
                }

       }