title: how to fill (write) datacolumn to list<>?
body: <p>I am trying to get a datacolumn with values (already filled in data table) and write it in an auto property present in access layer. Currently, the method i am using is fetching data from sql and passing the values to gird. I am trying to use that method and already filled datatable but the problem is, auto property is only reading column name and as a result i am getting column name in another control (list box). The below is my method in BLL.</p>
  
  <pre><code>DAL d = new DAL();
  
  public Object getfeechallan(Bal B) 
  {
  sqlcommand cmd = new sqlcommand("select * from tblfee where fee_challan_No like @abc,d.con");
  cmd.parameters.addwithvalue("@abc","%"+b.fee_challan_No+"%");
  datatable dt=d.getdatafilter(cmd);
  foreach(datacolumn dd in dt.columns)
  {
  if(dd.columnname=="ftid")
  {
  list&lt;DataColumn&gt; dc = new list&lt;DataColumn&gt;();
  dc.Add(dd);
  b.abc=dc;
  }
  
  } return dt;
  
  
  }
  </code></pre>
  
  <p>My method in DAL is</p>
  
  <pre><code>public Datatable getdatafilter(SqlCommand CMD)
  {
  SqlDataAdapter da = new SqlDataAdapter(CMD);
  Datatable dt = new Datatable ();
  da.Fill(dt);
  return dt;
  }
  </code></pre>
  
  <p>Auto Property is</p>
  
  <pre><code>public list&lt;DataColumn&gt; abc {get; set;}
  </code></pre>