title: How to allow html tags in DataGrid BoundColumn cell
body: <p>I have an asp.net web forms app.<br>
  I want to be able add html tags inside <code>DataGrid</code> cell. Problem is <code>DataGrid</code> doesn't support <code>HtmlEncode</code> property for the <code>BoundColumn</code> .  And after i click update i have <code>System.Web.HttpRequestValidationException</code> error .<br>
  I understand that I could set <code>ValidateRequestMode</code> for the DataGrid or <code>ValidateRequest</code> for the whole page, but I want to set this property only for one column.<br>
  How can i allow to input HTML tags for a single column?  </p>
  
  <p><strong>UPDATE</strong>: If if use ItemTemplate, this cell will not be able to edit from <code>OnEditCommand</code>. I need a way to make it editable like other cells.<br>
  My Grid:  </p>
  
  <pre><code>     &lt;asp:DataGrid runat="server" ID="MainGrid"    AutoGenerateColumns="false"  OnEditCommand="MainGrid_EditCommand"  OnUpdateCommand="MainGrid_UpdateCommand" OnItemDataBound="MainGrid_ItemDataBound" OnSortCommand="MainGrid_SortCommand" AllowSorting="true"  &gt;
              &lt;Columns&gt;  
               &lt;asp:BoundColumn  HeaderText="Id" DataField="ID" /&gt; 
               &lt;asp:BoundColumn HeaderText="Name" DataField="Name"/&gt; 
               &lt;asp:BoundColumn HeaderText="Source" DataField="Source"/&gt; 
               &lt;asp:BoundColumn DataField="Is Active" HeaderText="Is Active" /&gt; 
               &lt;asp:BoundColumn DataField="Email" HeaderText="Email" SortExpression="Email" /&gt; 
             &lt;asp:TemplateColumn HeaderText="Additional info" SortExpression="Additional info" &gt; 
  &lt;ItemTemplate &gt; 
  
          &lt;asp:Literal Text='&lt;%# DataBinder.Eval(Container.DataItem, "Additional info") %&gt;
                             runat="server"    ValidateRequestMode="Disabled" /&gt;
  
       &lt;/ItemTemplate&gt;
  
          &lt;/asp:TemplateColumn&gt;
              &lt;asp:BoundColumn  DataField="Photo Path"  HeaderText="Photo Path"/&gt; 
              &lt;asp:EditCommandColumn  EditText="Edit"  CancelText="Cancel" UpdateText="Update" HeaderText="Edit"/&gt;
              &lt;asp:ButtonColumn CommandName="Delete" HeaderText="Delete" Text="Delete"/&gt; 
  
            &lt;/Columns&gt;  
                      &lt;/asp:DataGrid&gt;
  </code></pre>
  
  <p>Code :  </p>
  
  <pre><code>protected void MainGrid_EditCommand(object source, DataGridCommandEventArgs e)
  {
      MainGrid.EditItemIndex = e.Item.ItemIndex;
  
      BindData();
  }
  </code></pre>