Description of Dynamically Calculating in a DataGrid :
This is an easy to learn article in which the author explains you how to perform calculations based on the values of the datagrid columns and display the result in a column of the datagrid control. You can perform this calculation in the ItemDataBound event of the DataGrid control. An example calculation is done for the miles per gallon of gas with the provided miles and gallons table.