# C1.WPF.Grid.GridMergeManager.GetMergedRange

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Grid_GridMergeManager_GetMergedRange_" data-uid="C1.WPF.Grid.GridMergeManager.GetMergedRange*">GetMergedRange Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Grid_GridMergeManager_GetMergedRange_" data-uid="C1.WPF.Grid.GridMergeManager.GetMergedRange*"></a>
<h4 id="C1_WPF_Grid_GridMergeManager_GetMergedRange_C1_WPF_Grid_GridCellType_C1_WPF_Grid_GridCellRange_" data-uid="C1.WPF.Grid.GridMergeManager.GetMergedRange(C1.WPF.Grid.GridCellType,C1.WPF.Grid.GridCellRange)">GetMergedRange(GridCellType, GridCellRange)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a> that specifies the merged extent of a cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual GridCellRange GetMergedRange(GridCellType cellType, GridCellRange range)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function GetMergedRange(cellType As GridCellType, range As GridCellRange) As GridCellRange</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="C1.WPF.Grid.GridCellType.html">GridCellType</a></td>
      <td><span class="parametername">cellType</span></td>
      <td><p>Type of the cell.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td><span class="parametername">range</span></td>
      <td><p>The range of the original cell.</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="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Grid_GridMergeManager_GetMergedRange_" data-uid="C1.WPF.Grid.GridMergeManager.GetMergedRange*"></a>
<h4 id="C1_WPF_Grid_GridMergeManager_GetMergedRange_C1_WPF_Grid_GridPanel_C1_WPF_Grid_GridCellRange_C1_WPF_Grid_GridCellRange_System_Boolean_System_Boolean_System_Boolean_" data-uid="C1.WPF.Grid.GridMergeManager.GetMergedRange(C1.WPF.Grid.GridPanel,C1.WPF.Grid.GridCellRange,C1.WPF.Grid.GridCellRange,System.Boolean,System.Boolean,System.Boolean)">GetMergedRange(GridPanel, GridCellRange, GridCellRange, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a> that specifies the merged extent of a cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected static GridCellRange GetMergedRange(GridPanel panel, GridCellRange extentRange, GridCellRange range, bool vertical = true, bool expand = false, bool mergeNullOrWhitespace = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Shared Function GetMergedRange(panel As GridPanel, extentRange As GridCellRange, range As GridCellRange, Optional vertical As Boolean = True, Optional expand As Boolean = False, Optional mergeNullOrWhitespace As Boolean = False) As GridCellRange</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="C1.WPF.Grid.GridPanel.html">GridPanel</a></td>
      <td><span class="parametername">panel</span></td>
      <td><p>The panel to be merged.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td><span class="parametername">extentRange</span></td>
      <td><p>The range which limits the zone to look for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td><span class="parametername">range</span></td>
      <td><p>The range inside the panel.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">vertical</span></td>
      <td><p>if set to <code>true</code> the merge will be performed vertically, otherwise horizontally.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">expand</span></td>
      <td><p>if set to <code>true</code> the merge algorithm can expand to adjacent columns or rows depending on the direction.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">mergeNullOrWhitespace</span></td>
      <td><p>When set to false (default), the cells whose text is empty or null will not be merged.</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="C1.WPF.Grid.GridCellRange.html">GridCellRange</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
