Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to subtract two rows asp ne gridview in asp.net

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())) 
                }

       }
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #subtract #rows #asp #ne #gridview
ADD COMMENT
Topic
Name
1+6 =