Common/DocumentResultList: Refresh results after saving changes

This commit is contained in:
Jonathan Jenne
2022-06-17 11:01:53 +02:00
parent e328224d15
commit 03c3f2be3b
5 changed files with 133 additions and 116 deletions

View File

@@ -503,6 +503,10 @@ Public Class frmDocumentResultList
Else
IsLoading = True
Try
' Save current row handle and unset it
Dim oCurrentRowHandle As Integer = GridView1.FocusedRowHandle
GridView1.FocusedRowHandle = GridControl.InvalidRowHandle
' Save the new results
ResultLists = pResults
@@ -513,6 +517,10 @@ Public Class frmDocumentResultList
UpdateTotalResults()
LoadGridDataAndLayout()
' After the new results are loaded, set the old row handle
' to trigger the row change events and load object properties
GridView1.FocusedRowHandle = oCurrentRowHandle
Return True
Catch ex As Exception
Logger.Error(ex)
@@ -1033,7 +1041,9 @@ Public Class frmDocumentResultList
End Sub
Private Async Sub MenuItemSaveProperties_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemSaveProperties.ItemClick
Await CtrlObjectPropertyDialog.SaveChanges()
If Await CtrlObjectPropertyDialog.SaveChanges() Then
RaiseEvent NeedsRefresh(sender, Params.ProfileGuid)
End If
End Sub
Private Sub BarButtonItem11_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarButtonItem11.ItemClick