# C1.Win.FlexGrid.C1FlexGridBase.AllowAddNew

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_C1FlexGridBase_AllowAddNew_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.AllowAddNew*">AllowAddNew Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_C1FlexGridBase_AllowAddNew_" data-uid="C1.Win.FlexGrid.C1FlexGridBase.AllowAddNew*"></a>
<h4 id="C1_Win_FlexGrid_C1FlexGridBase_AllowAddNew" data-uid="C1.Win.FlexGrid.C1FlexGridBase.AllowAddNew">AllowAddNew</h4>
<div class="markdown level1 summary"><p>Gets or sets whether the grid should display a new row template after the last data row.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool AllowAddNew { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property AllowAddNew As Boolean</code></pre>
</div>
<h5 id="C1_Win_FlexGrid_C1FlexGridBase_AllowAddNew_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If the user enters data into the new row template, a new row is automatically added to the grid.</p>
<p>This property works in bound mode (if the data source supports adding new rows) and also in 
unbound mode.</p>
<p>Note that if this property is set to true, the Rows.Count property will return a value 
that includes the new row template. If you set the Rows.Count property, the grid will set the 
number of data rows and will automatically add the new row template. For example:</p>
<pre><code class="lang-csharp">flex.AllowAddNew = true;
flex.Rows.Count = 10;
Console.WriteLine("Row count is {0}.", _flex.Rows.Count);
   Row count is 11.</code></pre>
</div>
</div>
