# C1.LiveLinq.LiveViews.ViewRowState

## Content

<div class="doc-site-dotnet-api-container">




  <h1 id="C1_LiveLinq_LiveViews_ViewRowState" data-uid="C1.LiveLinq.LiveViews.ViewRowState" class="text-break">ViewRowState Enum
</h1>
  <div class="markdown level0 summary"><p>The state of a view row with regard to edit, add and delete operations if they are performed directly on the view.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.LiveLinq.LiveViews.html">C1.LiveLinq.LiveViews</a></h6>
  <h6><strong>Assembly</strong>: C1.LiveLinq.4.8.dll</h6>
  <h5 id="C1_LiveLinq_LiveViews_ViewRowState_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public enum ViewRowState</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Enum ViewRowState</code></pre>
  </div>
  <h5 id="C1_LiveLinq_LiveViews_ViewRowState_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p> This state concerns edit, add and delete operations performed directly on the view (programmatically via
<a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.html">ViewRow</a> objects or through data binding). It does not concern modifications made to the view's
base (source) data collections. Modifications made to source data can also change view items, as a result of the normal
view maintenance process, see <a class="xref" href="C1.LiveLinq.LiveViews.View.MaintenanceMode.html#C1_LiveLinq_LiveViews_View_MaintenanceMode">MaintenanceMode</a>, but in that case the state of thus added
or modified rows remains <b>Unmodified</b>. </p>
<p><b>Note on adding rows directly to the view:</b></p>
<p>If a row is added directly to the view (as opposed to adding it to one of its base data collections), the following happens:</p>
<p>When a new row is created with <a class="xref" href="C1.LiveLinq.LiveViews.ViewRowCollection.CreateRow.html#C1_LiveLinq_LiveViews_ViewRowCollection_CreateRow">CreateRow()</a> or through data binding, it enters edit mode.</p>
When it is committed with <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.EndEdit.html#C1_LiveLinq_LiveViews_ViewRow_EndEdit">EndEdit()</a>,
a new row is added to the view's base data collection, and, usually,
a corresponding row appears in the view, that has <b>Unmodified</b> state, although
in some cases it may be more than one row or none, depending on the view query. The original view row
no longer corresponds to a view item after the <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.EndEdit.html#C1_LiveLinq_LiveViews_ViewRow_EndEdit">EndEdit()</a> or <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.CancelEdit.html#C1_LiveLinq_LiveViews_ViewRow_CancelEdit">CancelEdit()</a> call,
its state becomes <b>Detached</b>. Accessing it after that would throw an exception.
</div>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    <thead>
    </thead></thead><tbody>
      <tr>
        <td id="C1_LiveLinq_LiveViews_ViewRowState_Detached">Detached</td>
        <td><p>The row was deleted, or it is a new row after exiting edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_LiveViews_ViewRowState_Modified">Modified</td>
        <td><p>The row is in edit mode (<a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.BeginEdit.html#C1_LiveLinq_LiveViews_ViewRow_BeginEdit">BeginEdit()</a> was called,
neither <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.EndEdit.html#C1_LiveLinq_LiveViews_ViewRow_EndEdit">EndEdit()</a> nor <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.CancelEdit.html#C1_LiveLinq_LiveViews_ViewRow_CancelEdit">CancelEdit()</a> was called yet),
and the row is not new (was not created by <a class="xref" href="C1.LiveLinq.LiveViews.ViewRowCollection.CreateRow.html#C1_LiveLinq_LiveViews_ViewRowCollection_CreateRow">CreateRow()</a>).</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_LiveViews_ViewRowState_New">New</td>
        <td><p>The row was added to the view directly (not by adding to a basic data collection)
by calling <a class="xref" href="C1.LiveLinq.LiveViews.ViewRowCollection.CreateRow.html#C1_LiveLinq_LiveViews_ViewRowCollection_CreateRow">CreateRow()</a> or through data binding (such new row
enters edit mode once it is created) and still in edit mode
(neither <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.EndEdit.html#C1_LiveLinq_LiveViews_ViewRow_EndEdit">EndEdit()</a> nor <a class="xref" href="C1.LiveLinq.LiveViews.ViewRow.CancelEdit.html#C1_LiveLinq_LiveViews_ViewRow_CancelEdit">CancelEdit()</a> was called yet).</p>
</td>
      </tr>
      <tr>
        <td id="C1_LiveLinq_LiveViews_ViewRowState_Unmodified">Unmodified</td>
        <td><p>The row is a regular view row, not in edit mode and not deleted.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.LiveLinq.Hints.Indexed.html#C1_LiveLinq_Hints_Indexed__1___0_">Hints.Indexed&lt;ViewRowState&gt;(ViewRowState)</a>
  </div>
  <div>
      <a class="xref" href="C1.LiveLinq.Hints.Indexed.html#C1_LiveLinq_Hints_Indexed__1___0_C1_LiveLinq_IndexingHintAction_">Hints.Indexed&lt;ViewRowState&gt;(ViewRowState, IndexingHintAction)</a>
  </div>
</div>
