Hi, there are quite a few difference, let me share the major items:
Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'SET ITEM COLLECTION IN COMBOBOX - This Column - called "oFrequencyUnit" will show later very often (on each record change, even if the record is not dirty)
Dim oSourceColl As New StringCollection
oSourceColl.Add("")
oSourceColl.Add("Days")
oSourceColl.Add("Month")
oSourceColl.Add("Year")
GridGroupingControl1.TableDescriptor.Columns(8).Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.ComboBox
GridGroupingControl1.TableDescriptor.Columns(8).Appearance.AnyRecordFieldCell.ChoiceList = oSourceColl
GridGroupingControl1.Table.Records(0).SetCurrent() 'This triggers the CurrentRecordContextChange event
End sub
Private Sub GridGroupingControl1_CurrentRecordContextChange(sender As Object, e As CurrentRecordContextChangeEventArgs) Handles GridGroupingControl1.CurrentRecordContextChange
If (e.Action = Syncfusion.Grouping.CurrentRecordAction.EndEditCalled) Then '...
If (e.Action = Syncfusion.Grouping.CurrentRecordAction.EnterRecordComplete) Then '...
If e.Action = CurrentRecordAction.LeaveRecordCalled Then '...
If Not IsNothing(e.Table.CurrentRecord) Then '...
If e.Action = CurrentRecordAction.NavigateCalled Then '...
If e.Action = CurrentRecordAction.BeginEditCalled Then '...
End sub
I have set a series of triggers to avoid unnecessary repetition of the code in SourceListListChanged (pretty heavy stuff), in the Form_Shown, NavigateCalled and BeginEditCalled events, getting rid of the inconvenience during load time, and during form exit. That part is kinda resolved... Only remains the GridCombo ("oFrequencyUnit") which seems one of the causes of the problem - which as I said previously, is triggering the SourceListListChanged on a new record selection, and shows as "ItemChanged" even if the record is not dirty
Here is what I am using to date to filter the incoming in the SourceListListChanged event
If Not IsNothing(e.PropertyDescriptor) Then
Dim PDDN As String = e.PropertyDescriptor.DisplayName.ToString
If (e.ListChangedType = ListChangedType.ItemChanged) AndAlso PDDN <> "oFrequencyUnit" AndAlso (GlobalVariables.EnterRecTrigger = 1) AndAlso (sender.TableControl.HasControlFocus = True) Then
I know it's not an easy one to replicate.... Thanks a bunch Anish and all the best - Nicolas