# GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionLength

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionLength_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionLength*">SelectionLength Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionLength_" data-uid="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionLength*"></a>
<h4 id="GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionLength" data-uid="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionLength">SelectionLength</h4>
<div class="markdown level1 summary"><p>Gets or sets the number of characters selected in the control.</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 virtual int SelectionLength { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Browsable(False)&gt;
Public Overridable Property SelectionLength As Integer</code></pre>
</div>
<h5 class="propertyValue">Property Value</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.int32">int</a></td>
      <td><p>The number of characters selected in the control.
<br>
The default is zero.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionLength_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>You can use this property to determine if any characters are currently selected in the control before performing operations on the selected text. When the value of the <b>SelectionLength</b> property is set to a value that is larger than the number of characters within the text of the control, the value of the <b>SelectionLength</b> property is set to the entire length of text within the control minus the value of the <a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionStart.html#GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionStart">SelectionStart</a> property
(if any value is specified for the <a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionStart.html#GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionStart">SelectionStart</a> property).</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>The assigned value is less than zero.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionLength_seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectionStart.html#GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectionStart">SelectionStart</a></div>
    <div><a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.EditBase.SelectedText.html#GrapeCity_Win_Spread_InputMan_CellType_EditBase_SelectedText">SelectedText</a></div>
    <div><a class="xref" href="GrapeCity.Win.Spread.InputMan.CellType.EditBase.Select.html#GrapeCity_Win_Spread_InputMan_CellType_EditBase_Select_System_Int32_System_Int32_">Select</a>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</div>
</div>
</div>
