# C1.Win.FlexGrid.C1FlexGridBase.Clip

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_Clip_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Clip*">Clip Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_Clip_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Clip*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_Clip" data-uid="C1.Win.FlexGrid.C1FlexGridBase.Clip">Clip</h4>
<div class="markdown level1 summary"><p>Gets the contents of the selected ranges. Sets the contents to the current selected range.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Browsable(false)]
public string Clip { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public Property Clip As String</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_Clip_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The string assigned to (or returned by) the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.Clip.html#C1_Win_FlexGrid_C1FlexGridBase_Clip">Clip</a> property may contain 
multiple cells. By default, tab characters (\t) indicate column breaks, and carriage return 
characters (\n) indicate row breaks.</p>
<p>The default row and column delimiters may be changed using the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ClipSeparators.html#C1_Win_FlexGrid_C1FlexGridBase_ClipSeparators">ClipSeparators</a> property.</p>
<p>When a string is assigned to the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.Clip.html#C1_Win_FlexGrid_C1FlexGridBase_Clip">Clip</a> property, only the selected 
cells are affected. If there are more cells in the selected region than are described in the 
clip string, the remaining cells are ignored. If there are more cells described in the clip 
string than in the selected region, the extra portion of the clip string is ignored. Empty 
entries in the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.Clip.html#C1_Win_FlexGrid_C1FlexGridBase_Clip">Clip</a> string will clear existing cell contents.</p>
<p>To get or set a clip string for an arbitrary range, use a <a class="xref" href="C1.Win.FlexGrid.CellRange.html">CellRange</a> object.</p>
<p>The value returned is affected by the setting of the <a class="xref" href="C1.Win.FlexGrid.C1FlexGridBase.ClipboardCopyMode.html#C1_Win_FlexGrid_C1FlexGridBase_ClipboardCopyMode">ClipboardCopyMode</a> 
property.</p>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_Clip_examples">Examples</h5>
<p>The code below puts text into a selected area two rows high and two columns wide.</p>
<pre><code class="lang-csharp">// build clip string
string s = "r1 c1\tr1 c2\nr2 c1\tr2 c2";

// select a 2 x 2 range and apply clip string to selection
flex.Select(2, 2, 4, 4);
flex.Clip = s;</code></pre>

</div>
