title: EDMX in gridview dynamically creating columns according to data
body: <p>I have been struggling with this for a while now. 
  I want to dynamically create data columns using the entity framework. </p>
  
  <pre><code>var query2 = (from c in dbc.FridayTimeSlots
                where c.RoundType == "Back 9"
                select c);
  grvF2.Columns.Clear();
  grvF2.DataSource = query2.ToList();
  grvF2.Columns.Add(new BoundField { DataField = "TeeTime", HeaderText = "Tee-Off Time" });
  grvF2.Columns.Add(new CommandField { HeaderText = "Select", SelectText = "Select Time", ButtonType = ButtonType.Link, ShowSelectButton = true });
  grvF2.DataKeyNames = new string[] { "TimeID" };
  grvF2.DataBind();
  </code></pre>
  
  <p>My problem, I want to only display the command field when the data field TeeTime = "something" and when TeeTime = "somethinig else" I don't want the commandfield there.</p>
  
  <p>If tried just about everything but I can't get the solution. 
  Any help would be greatly appreciated.</p>