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.
Unfortunately, activation email could not send to your email. Please try again.

Audit trail in gridgroupingcontrol

Thread ID:

Created:

Updated:

Platform:

Replies:

124627 Jun 19,2016 03:20 PM Jun 20,2016 02:42 AM Windows Forms 2
loading
Tags: GridGroupingControl
Nicolas
Asked On June 19, 2016 03:20 PM

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


Nicolas
Replied On June 19, 2016 04:18 PM

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


Piruthiviraj Malaimelraj [Syncfusion]
Replied On June 20, 2016 02:42 AM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;