Private Sub GGC1_RecordValueChanging(sender As Object, e As RecordValueChangingEventArgs) Handles GGC1.RecordValueChanging
End Sub
Just to let you know, initially, I had only the Call AuditTrail function, and with this only the Row behavior is good, but cannot get the proper PK value, specially if you deleted rows prior to this new addrow
I hope it's clear? Thanks in advance! - Nicolas
Private Sub GridGroupingControl1_TableControlCurrentCellEditingComplete(sender As Object, e As GridTableControlEventArgs) Handles GridGroupingControl1.TableControlCurrentCellEditingComplete
Dim style As GridTableCellStyleInfo = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex)
If Not IsNothing(style.TableCellIdentity.Column) AndAlso Not IsNothing(e.TableControl.CurrentCell.Renderer) AndAlso GlobalVariables.AddNew = 1 Then
Dim ColumnName As String = style.TableCellIdentity.Column.Name
Dim Value As Object = style.CellValue
Me.Validate()
GlobalVariables.CurrentBindingSource.EndEdit()
MyTableTableAdapter.Update(GlobalVariables.curDT)
Dim ID As Integer = DLastDT(sender.TableDescriptor.Columns(0).Name, GlobalVariables.curDT, "")
Call AuditTrailGGC_New(GridGroupingControl1, sender, "New", ID, ColumnName, Value)
GlobalVariables.AddNew = 0
End If
End Sub