# C1.WPF.FlexGrid.C1FlexGrid.CellEditEnding

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_WPF_FlexGrid_C1FlexGrid_CellEditEnding" data-uid="C1.WPF.FlexGrid.C1FlexGrid.CellEditEnding" class="text-break">CellEditEnding Event
</h1>
<div class="markdown level0 summary"><p>Occurs when a cell edit is ending.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.FlexGrid.html">C1.WPF.FlexGrid</a></h6>
<h6><strong>Assembly</strong>: C1.WPF.FlexGrid.4.6.2.dll</h6>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_CellEditEnding_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event EventHandler&lt;CellEditEventArgs&gt; CellEditEnding</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Event CellEditEnding As EventHandler(Of CellEditEventArgs)</code></pre>
</div>
<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.eventhandler-1">EventHandler</a>&lt;<a class="xref" href="C1.WPF.FlexGrid.CellEditEventArgs.html">CellEditEventArgs</a>&gt;</td>
      <td>Occurs when a cell edit is ending.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_FlexGrid_C1FlexGrid_CellEditEnding_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><pre><code>&lt;p&gt;You can cancel this event by setting the &lt;b&gt;Cancel&lt;/b&gt; property of the event argument 
</code></pre>
<p>to true in the event handler.</p>
<p>If this event is not canceled, the edits will be committed or canceled depending on the
setting of the <b>CancelEdits</b> property of the event argument.</p>
<p>After the edit has been successfully committed or canceled, the <a class="xref" href="C1.WPF.FlexGrid.C1FlexGrid.CellEditEnded.html">CellEditEnded</a>
event occurs.</p>
<p>By default, you can edit items directly in the grid. To guarantee that edits can be
committed and canceled correctly, the objects in the grid must implement the
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.ieditableobject">IEditableObject</a> interface.</p>
<p>Alternatively, you can set the <a class="xref" href="C1.WPF.FlexGrid.C1FlexGrid.IsReadOnly.html#C1_WPF_FlexGrid_C1FlexGrid_IsReadOnly">IsReadOnly</a> property to true to
disable editing in the grid.</p>
</div>
</div>
