Adding new Columns to GridView with a new DataSource
<p>I have a gridview that is loaded from a DataSet, in which most of the fields are generated through templates.</p>

<p>One of them is an Image that changes according to the value that is returned from the dataset.
Here is an example:</p>

<pre><code>&lt;asp:TemplateField HeaderText="Attention"&gt;
  &lt;ItemTemplate&gt;
    &lt;asp:Image ID="alertFlag" runat="server" ImageUrl='&lt;%# Eval("alertFlag").ToString().Equals("True") ? "~/Images/Warning-32.png" : "" %&gt;' /&gt;
  &lt;/ItemTemplate&gt;
&lt;/asp:TemplateField&gt;
</code></pre>

<p>Now I have a dropdown list, in which, depending on what is chosen, a new request to the database is made, and new columns are added, but the previous ones must stay.</p>

<p>Should I create a new GridView or how should I add new the new columns, keep them hidden, and then show them when the proper event is fired. this includes loading new data from the database and binding to the gridview. And how would I add the condition above programatically?</p>

<p>Thanks.</p>
