GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : NewRowNeeded Event |
<SRCategoryAttribute("Data")> <SRDescriptionAttribute("Occurs when the VirtualMode property of the GcMultiRow control is true and the user navigates to the new row at the bottom of GcMultiRow.")> <FeatureAttribute(Name="VirtualMode", Version="v5.0")> Public Event NewRowNeeded As EventHandler(Of RowEventArgs)
Dim instance As GcMultiRow Dim handler As EventHandler(Of RowEventArgs) AddHandler instance.NewRowNeeded, handler
[SRCategory("Data")] [SRDescription("Occurs when the VirtualMode property of the GcMultiRow control is true and the user navigates to the new row at the bottom of GcMultiRow.")] [Feature(Name="VirtualMode", Version="v5.0")] public event EventHandler<RowEventArgs> NewRowNeeded
The event handler receives an argument of type RowEventArgs containing data related to this event. The following RowEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Row | Gets the Row that is involved. |
This event is optional in virtual mode. Use this event if you want to automatically generate values when the current cell is in an uncommitted new row such as a database. Handle this event, and then change the value of the cells in the RowEventArgs.Row property of the RowEventArgs.
When GcMultiRow is in virtual mode, this event allows a new entry to be created in the data store for the new row, and it also allows the row to be populated with default values.
void gcMultiRow1_NewRowNeeded(object sender, RowEventArgs e) { // Add new row when user moves current cell to last new row. uncommitNewStudent = new Student(userData.Count, null, 0, 0); }
Private Sub gcMultiRow1_NewRowNeeded(ByVal sender As Object, ByVal e As RowEventArgs) Handles gcMultiRow1.NewRowNeeded ' Add new row when user moves current cell to last new row. uncommitNewStudent = New Student(userData.Count, Nothing, 0, 0) End Sub #End Region
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