title: Adding column in a datatable with a dynamic column name in C#
body: <pre><code>DataTable dt = new DataTable();
  var dr = dt1.Date; 
  String rr = Convert.ToString(dr); 
  DataColumn dc1=new DataColumn(); 
  dc1.ColumnName = rr; dt.Columns.Add(dc1);
  </code></pre>
  
  <p>And if i add datarow after this like</p>
  
  <pre><code>dt.Rows.Add("hello","hello1","hello2");  
  dataGrid1.ItemsSource = dt.DefaultView;
  </code></pre>
  
  <p>the data is not displayed in the grid .
  If i comment the line</p>
  
  <pre><code>dc1.ColumnName = rr;
  </code></pre>
  
  <p>the values are displayed properly 
  But i want the colmn name to be the date that is "dt1" here</p>
  
  <p>pleae note that the dt1 are the date values which is dynamic and it will be incremented in each loop.
  like </p>
  
  <pre><code>dt1 = dt1.AddDays(1);
  </code></pre>
  
  <p>Please help</p>