GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : CancelRowEdit Event |
<SRCategoryAttribute("Action")> <SRDescriptionAttribute("Occurs when the VirtualMode property of a GcMultiRow control is true and then cancels edits in a row. ")> <FeatureAttribute(Name="VirtualMode", Version="v5.0")> Public Event CancelRowEdit As EventHandler(Of QuestionEventArgs)
Dim instance As GcMultiRow Dim handler As EventHandler(Of QuestionEventArgs) AddHandler instance.CancelRowEdit, handler
[SRCategory("Action")] [SRDescription("Occurs when the VirtualMode property of a GcMultiRow control is true and then cancels edits in a row. ")] [Feature(Name="VirtualMode", Version="v5.0")] public event EventHandler<QuestionEventArgs> CancelRowEdit
The event handler receives an argument of type QuestionEventArgs containing data related to this event. The following QuestionEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Response | Gets or sets a value indicating the response to a question represented by the event. |
void gcMultiRow1_CancelRowEdit(object sender, QuestionEventArgs e) { int currentRowIndex = gcMultiRow1.CurrentCellPosition.RowIndex; // Cancel uncommitted new row. if (currentRowIndex >= 0 && currentRowIndex < gcMultiRow1.RowCount - 1) { // Cancel row level edit. userData[currentRowIndex] = new Student(restoreRow.ID, restoreRow.Name, restoreRow.MathematicsScore, restoreRow.PhilosophyScore); } }
Private Sub gcMultiRow1_CancelRowEdit(ByVal sender As Object, ByVal e As QuestionEventArgs) Handles gcMultiRow1.CancelRowEdit Dim currentRowIndex As Integer = gcMultiRow1.CurrentCellPosition.RowIndex ' Cancel uncommitted new row. If currentRowIndex >= 0 AndAlso currentRowIndex < gcMultiRow1.RowCount - 1 Then ' Cancel row level edit. userData(currentRowIndex) = New Student(restoreRow.ID, restoreRow.Name, restoreRow.MathematicsScore, restoreRow.PhilosophyScore) End If End Sub
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