w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
total amount of the entire column in Datagridview passing to a textbox in c#

Try This:

double totalAmount=0;
for (int x = 0; x < SalesDataGrid.Rows.Count; x++)
{
totalAmount +=
Convert.ToDouble(SalesDataGrid.Rows[x].Cells[3].Value.ToString());
}

txtsalestotal.Text=totalAmount.ToString();




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.