# C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize*">MeasureCellSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_System_Int32_System_Int32_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize(System.Int32,System.Int32)">MeasureCellSize(int, int)</h4>
<div class="markdown level1 summary"><p>Measures the specified cell when drawn.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size MeasureCellSize(int row, int col)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function MeasureCellSize(row As Integer, col As Integer) As Size</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>Specified cell row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">col</span></td>
      <td><p>Specified cell column.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>Returns the size that the specified cell will occupy after drawing.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_System_Int32_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Creates a new <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object on each call.
To calculate the size of multiple cells, use <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize.html#C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_System_Drawing_Graphics_System_Int32_System_Int32_">MeasureCellSize(Graphics, int, int)</a></p>
</div>


<a id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_MeasureCellSize_System_Drawing_Graphics_System_Int32_System_Int32_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.MeasureCellSize(System.Drawing.Graphics,System.Int32,System.Int32)">MeasureCellSize(Graphics, int, int)</h4>
<div class="markdown level1 summary"><p>Measures the specified cell when drawn.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Size MeasureCellSize(Graphics g, int row, int col)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function MeasureCellSize(g As Graphics, row As Integer, col As Integer) As Size</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>Graphics.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>Specified cell row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">col</span></td>
      <td><p>Specified cell column.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.size">Size</a></td>
      <td><p>Returns the size that the specified cell will occupy after drawing.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
