# C1.Win.FlexGrid.DrawCellFlags

## Content

<div class="doc-site-dotnet-api-container">




  <h1 id="C1_Win_FlexGrid_DrawCellFlags" data-uid="C1.Win.FlexGrid.DrawCellFlags" class="text-break">DrawCellFlags Enum
</h1>
  <div class="markdown level0 summary"><p>Specifies which elements of the cell should be drawn by the grid.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.FlexGrid.html">C1.Win.FlexGrid</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.FlexGrid.10.dll</h6>
  <h5 id="C1_Win_FlexGrid_DrawCellFlags_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Flags]
public enum DrawCellFlags</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Flags&gt;
Public Enum DrawCellFlags</code></pre>
  </div>
  <h5 id="C1_Win_FlexGrid_DrawCellFlags_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This enumeration is used when rendering owner-drawn cells.</p>
<p>If you set the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.drawmode">DrawMode</a> property to <a class="xref" href="C1.Win.FlexGrid.DrawModeEnum.html#C1_Win_FlexGrid_DrawModeEnum_OwnerDraw">OwnerDraw</a>, 
the grid will fire the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.OwnerDrawCell.html">OwnerDrawCell</a> event to allow custom cell drawing.</p>
<p>The <a class="xref" href="C1.Win.FlexGrid.OwnerDrawCellEventArgs.html">OwnerDrawCellEventArgs</a> parameter passed to the event handler has a 
<a class="xref" href="C1.Win.FlexGrid.OwnerDrawCellEventArgs.DrawCell.html#C1_Win_FlexGrid_OwnerDrawCellEventArgs_DrawCell_C1_Win_FlexGrid_DrawCellFlags_">DrawCell(DrawCellFlags)</a> method that allows you to use the standard 
drawing routines for rendering parts of the cell. For example, you can paint a custom background 
and use the standard drawing routines for the cell borders and content.</p>
<p>See the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.OwnerDrawCell.html">OwnerDrawCell</a> event for an example.</p>
</div>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    <thead>
    </thead></thead><tbody>
      <tr>
        <td id="C1_Win_FlexGrid_DrawCellFlags_All">All</td>
        <td><p>Draw all cell elements (background, border, and contents).</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_FlexGrid_DrawCellFlags_Background">Background</td>
        <td><p>Draw the cell background.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_FlexGrid_DrawCellFlags_Border">Border</td>
        <td><p>Draw the cell border.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_FlexGrid_DrawCellFlags_Content">Content</td>
        <td><p>Draw the cell content (text, images, check boxes, etc).</p>
</td>
      </tr>
    </tbody>
  </table>
</div>
