# FarPoint.Web.Spread.Model.DefaultSheetSelectionModel

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel" class="text-break">DefaultSheetSelectionModel Class
</h1>
  <div class="markdown level0 summary"><p>Represents the full (concrete) implementation of the ISheetSelectionModel interface for a selection model for a sheet,
which represents cell selections.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="FarPoint.Web.Spread.Model.BaseSheetSelectionModel.html">BaseSheetSelectionModel</a></div>
    <div class="level2"><span class="xref">DefaultSheetSelectionModel</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="FarPoint.Web.Spread.Model.ISheetSelectionModel.html">ISheetSelectionModel</a></div>
    <div><a class="xref" href="FarPoint.Web.Spread.Model.ISerializeSupport.html">ISerializeSupport</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable">ISerializable</a></div>
    <div><a class="xref" href="FarPoint.Web.Spread.Model.IDisjointSelections.html">IDisjointSelections</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="FarPoint.Web.Spread.Model.html">FarPoint.Web.Spread.Model</a></h6>
  <h6><strong>Assembly</strong>: FarPoint.Web.Spread.dll</h6>
  <h5 id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class DefaultSheetSelectionModel : BaseSheetSelectionModel, ISheetSelectionModel, ISerializeSupport, IEnumerable, ISerializable, IDisjointSelections</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class DefaultSheetSelectionModel
    Inherits BaseSheetSelectionModel
    Implements ISheetSelectionModel, ISerializeSupport, IEnumerable, ISerializable, IDisjointSelections</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel__ctor" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.#ctor">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.-ctor.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel__ctor">DefaultSheetSelectionModel()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a default selection model.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.-ctor.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">DefaultSheetSelectionModel(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a default selection model with data from the specified serialization and stream objects.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AnchorColumn" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AnchorColumn">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AnchorColumn.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AnchorColumn">AnchorColumn</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the column index of the first cell in the selection of cells.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AnchorRow" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AnchorRow">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AnchorRow.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AnchorRow">AnchorRow</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the row index of the first cell in the selection of cells.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Count" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Count">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Count.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Count">Count</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the number of selections.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Item_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Item(System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Item.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Item_System_Int32_">this[int]</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an item in the model.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_LeadColumn" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.LeadColumn">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.LeadColumn.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_LeadColumn">LeadColumn</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the column index of the farthest cell of the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_LeadRow" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.LeadRow">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.LeadRow.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_LeadRow">LeadRow</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the row index of the farthest cell of the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SelectionPolicy" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SelectionPolicy">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SelectionPolicy.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SelectionPolicy">SelectionPolicy</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether users can select ranges of items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AddSelection_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AddSelection(System.Int32,System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.AddSelection.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_AddSelection_System_Int32_System_Int32_System_Int32_System_Int32_">AddSelection(int, int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds a cell or cells to the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_ClearSelection" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.ClearSelection">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.ClearSelection.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_ClearSelection">ClearSelection()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Deserialize_System_Xml_XmlNodeReader_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Deserialize(System.Xml.XmlNodeReader)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Deserialize.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Deserialize_System_Xml_XmlNodeReader_">Deserialize(XmlNodeReader)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads the selection from XML.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetEnumerator" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetEnumerator">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetEnumerator.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetEnumerator">GetEnumerator()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an enumerator that can iterate through the selections.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetExtendedSelection_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetExtendedSelection(System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetExtendedSelection.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetExtendedSelection_System_Int32_System_Int32_">GetExtendedSelection(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the cell range that would be selected if you extended
the current selection to the specified row and column indexes.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetObjectData.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetObjectData_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_">GetObjectData(SerializationInfo, StreamingContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the default selection model to the SerializationInfo object.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetSelections_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetSelections(System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.GetSelections.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_GetSelections_System_Int32_System_Int32_">GetSelections(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns an ordered array of CellRange objects, from largest to smallest, containing the selected cells
with minimal overlap between the ranges.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsAnyCellInColumnSelected_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsAnyCellInColumnSelected(System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsAnyCellInColumnSelected.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsAnyCellInColumnSelected_System_Int32_">IsAnyCellInColumnSelected(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether any cell in a specified column is in the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsAnyCellInRowSelected_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsAnyCellInRowSelected(System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsAnyCellInRowSelected.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsAnyCellInRowSelected_System_Int32_">IsAnyCellInRowSelected(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether any cell in a specified row is in the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsEmpty" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsEmpty">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsEmpty.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsEmpty">IsEmpty()</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the model has no selections.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsSelected_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsSelected(System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.IsSelected.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_IsSelected_System_Int32_System_Int32_">IsSelected(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the specified cell is in the selection.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_RemoveSelection_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.RemoveSelection(System.Int32,System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.RemoveSelection.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_RemoveSelection_System_Int32_System_Int32_System_Int32_System_Int32_">RemoveSelection(int, int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Removes the specified selection range from the selection list, if one exists.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Serialize_System_Xml_XmlTextWriter_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Serialize(System.Xml.XmlTextWriter)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.Serialize.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_Serialize_System_Xml_XmlTextWriter_">Serialize(XmlTextWriter)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves a selection to XML.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SetAnchor_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SetAnchor(System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SetAnchor.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SetAnchor_System_Int32_System_Int32_">SetAnchor(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Specifies the anchor (or first cell) in the selection of cells.</p>
</td>
      </tr>
      <tr>
        <td id="FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SetSelection_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SetSelection(System.Int32,System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="FarPoint.Web.Spread.Model.DefaultSheetSelectionModel.SetSelection.html#FarPoint_Web_Spread_Model_DefaultSheetSelectionModel_SetSelection_System_Int32_System_Int32_System_Int32_System_Int32_">SetSelection(int, int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Selects the cells in the specified range.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
