# C1.Win.FlexGrid.C1FlexGrid.AllowMerging

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGrid_AllowMerging_" data-uid="C1.Win.FlexGrid.C1FlexGrid.AllowMerging*">AllowMerging Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGrid_AllowMerging_" data-uid="C1.Win.FlexGrid.C1FlexGrid.AllowMerging*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGrid_AllowMerging" data-uid="C1.Win.FlexGrid.C1FlexGrid.AllowMerging">AllowMerging</h4>
<div class="markdown level1 summary"><p>Gets or sets how cells should be merged.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(true)]
public AllowMergingEnum AllowMerging { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(True)&gt;
Public Property AllowMerging As AllowMergingEnum</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGrid_AllowMerging_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Merging cells allows you to display data in a clear, appealing way,
because it highlights groups of identical information. It also gives you 
flexibility to build tables similar to the ones you can create in HTML or 
using Microsoft Word, both of which support merged cells.</p>
<p>To create tables with merged cells, set the <a class="xref" href="C1.Win.FlexGrid.C1FlexGrid.AllowMerging.html#C1_Win_FlexGrid_C1FlexGrid_AllowMerging">AllowMerging</a> 
property to a value other than <a class="xref" href="C1.Win.FlexGrid.AllowMergingEnum.html#C1_Win_FlexGrid_AllowMergingEnum_None">None</a>, and 
set the <a class="xref" href="C1.Win.FlexGrid.RowCol.AllowMerging.html#C1_Win_FlexGrid_RowCol_AllowMerging">AllowMerging</a> property of individual rows and 
columns true for the rows and columns you wish to merge. After these 
properties are set, the grid will  automatically merge adjacent cells 
that have the same contents.</p>
<p>Whenever the cell contents change, the grid updates the merging state.</p>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGrid_AllowMerging_examples">Examples</h5>
<p>The code below causes the grid to merge cells with the same data in column 1:</p>
<pre><code class="lang-csharp">flex.AllowMerging = AllowMergingEnum.Free;
flex.Cols[1].AllowMerging = true; // merge values in column 1</code></pre>

</div>
