# FarPoint.Win.Spread.SheetView.SetModelRowForViewRow

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_SheetView_SetModelRowForViewRow_" data-uid="FarPoint.Win.Spread.SheetView.SetModelRowForViewRow*">SetModelRowForViewRow Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_SheetView_SetModelRowForViewRow_" data-uid="FarPoint.Win.Spread.SheetView.SetModelRowForViewRow*"></a>
<h4 id="FarPoint_Win_Spread_SheetView_SetModelRowForViewRow_System_Int32_System_Int32_" data-uid="FarPoint.Win.Spread.SheetView.SetModelRowForViewRow(System.Int32,System.Int32)">SetModelRowForViewRow(int, int)</h4>
<div class="markdown level1 summary"><p>Sets the row index in the data model that corresponds to the specified row index in the sheet.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual int SetModelRowForViewRow(int viewRow, int modelRow)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function SetModelRowForViewRow(viewRow As Integer, modelRow As Integer) As Integer</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">viewRow</span></td>
      <td><p>Row index in the sheet</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">modelRow</span></td>
      <td><p>Row index in the data model</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>A row index in the data model.</p>
</td>
    </tr>
  </tbody>
</table>
<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>Specified row in the sheet is out of range; must be between -1 and the total number of rows</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>Specified row in the model is out of range; must be between -1 and the total number of rows</p>
</td>
    </tr>
  </tbody>
</table>
</div>
