FlexGrid for WinForms
AllowAddNew Property



Gets or sets whether the grid should display a new row template after the last data row.
Syntax
'Declaration
 
<C1DescriptionAttribute("Allow user to add rows by typing into the last row.")>
<DefaultValueAttribute()>
<C1CategoryAttribute("Behavior")>
Public Property AllowAddNew As Boolean
'Usage
 
Dim instance As C1FlexGridBase
Dim value As Boolean
 
instance.AllowAddNew = value
 
value = instance.AllowAddNew
[C1Description("Allow user to add rows by typing into the last row.")]
[DefaultValue()]
[C1Category("Behavior")]
public bool AllowAddNew {get; set;}
[C1Description("Allow user to add rows by typing into the last row.")]
[DefaultValue()]
[C1Category("Behavior")]
public:
property bool AllowAddNew {
   bool get();
   void set (    bool value);
}
Remarks

If the user enters data into the new row template, a new row is automatically added to the grid.

This property works in bound mode (if the data source supports adding new rows) and also in unbound mode.

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:

flex.AllowAddNew = true; flex.Rows.Count = 10; Console.WriteLine("Row count is {0}.", _flex.Rows.Count); Row count is 11.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback