title: dynamic gridview column autocalculation
body: <p>I have a Gridview, with textboxes in templatefields, where i dynamically add columns to it. </p>
  
  <pre><code> protected void grid()
   {
      DataTable dt = new DataTable();
  
      dt.Columns.Add(new DataColumn("SerialNumber", typeof(string)));
      dt.Columns.Add(new DataColumn("Material", typeof(string)));
      dt.Columns.Add(new DataColumn("Bags", typeof(string)));
      dt.Columns.Add(new DataColumn("GrossWt", typeof(string)));
      dt.Columns.Add(new DataColumn("TareWt", typeof(string)));
      dt.Columns.Add(new DataColumn("NetWt", typeof(string)));
      dt.Columns.Add(new DataColumn("BillWt", typeof(string)));
  
      DataRow dr = dt.NewRow();
      dt.Rows.Add(dr);
      dr["SerialNumber"] = 1;
  
      GridView1.DataSource = dt;
      GridView1.DataBind();                      
  }
  </code></pre>
  
  <p>I need to have the NetWt column to have autocalulated values using the GrossWt and TareWt columns. The formula should be (grosswt-tarewt)/1000. But i dont know how to go about it. Any ideas?? </p>