We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Audit trail in gridgroupingcontrol

Hi, I am trying to make an audit trail in a GGC where I can gather Column name, Row ID, the Table name, Current user and Old value + New value of the field that has been changed. For the Table name, current user, I have no problem to retrieve a global variable, now as for gathering the other values, and in particular the Old and new value, it is a bit more challenging than I thought... I tried the following with no success, any help in providing direction for the event and procedure to use to get this would be welcomed!  - Nicolas

Private Sub GridGroupingControl1_CurrentRecordContextChange(sender As Object, e As CurrentRecordContextChangeEventArgs) Handles GridGroupingControl1.CurrentRecordContextChange

If (e.Action = Syncfusion.Grouping.CurrentRecordAction.BeginEditComplete) Then

Dim varOld As VariantType

Dim varNew As VariantType

Dim i As Integer

Dim record As Record = Me.GridGroupingControl1.Table.CurrentRecord

   For i = 0 To record.GetCustomCount

   varOld = record.GetOldValue(i)

   varNew = record.GetValue(i)

   Next i

End If

end sub


2 Replies

NI Nicolas June 19, 2016 08:18 PM UTC

Found it!

Private Sub GridGroupingControl1_RecordValueChanging(sender As Object, e As RecordValueChangingEventArgs) Handles GridGroupingControl1.RecordValueChanging

Dim NewValue As VariantType = e.NewValue.ToString

Dim ColumnName As String = e.Column

Dim Oldvalue As VariantType = e.Record.GetValue(ColumnName).ToString

Dim TableName As String = GlobalVariables.CurrentTable

Dim CurUser As String = GlobalVariables.CurrentUserAbbrev

 

End Sub



PM Piruthiviraj Malaimelraj Syncfusion Team June 20, 2016 06:42 AM UTC

Hi Nicolas, 
 
Thank you for using Syncfusion products. 
 
We are glad to hear from you that you have found the solution. Please let us know if you have any other queries. 
 
Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon