diff --git a/app/TaskFlow/frmMain.vb b/app/TaskFlow/frmMain.vb index 7322dad..699133e 100644 --- a/app/TaskFlow/frmMain.vb +++ b/app/TaskFlow/frmMain.vb @@ -1550,22 +1550,21 @@ Public Class frmMain End If End If If startedFrom = "CMGROUP" Then + LOGGER.Debug($"Item Scope - startedFrom: [{startedFrom}]") + Dim oIds As New List(Of Integer) - Dim oCount As Integer = 0 - '----------------------------- - Dim orows() As Integer = GridView_Docs.GetSelectedRows - Dim i As Integer - For i = 0 To orows.Length - 1 Step i + 1 - Dim childRowCount As Integer = GridView_Docs.GetChildRowCount(orows(i)) - Dim j As Integer - Dim childRowIndex As Integer - For j = 0 To childRowCount - 1 Step j + 1 - childRowIndex = GridView_Docs.GetChildRowHandle(orows(i), j) - Dim oRow = GridView_Docs.GetRow(childRowIndex) - oIds.Add(oRow.item("DocId")) - Next + Dim oGroupRowHandle = hitInfo.RowHandle + Dim oChildRowCount = GridView_Docs.GetChildRowCount(oGroupRowHandle) + + For index = 0 To oChildRowCount - 1 + Dim oChildRowHandle = GridView_Docs.GetChildRowHandle(oGroupRowHandle, index) + Dim oRow = GridView_Docs.GetRow(oChildRowHandle) + Dim oDocId = oRow.Item("DocId") + oIds.Add(oDocId) Next + + If oIds.Count = 0 Then For index = 0 To GridView_Docs.RowCount Dim oRow = GridView_Docs.GetRow(index) @@ -1578,13 +1577,10 @@ Public Class frmMain If oProfileId = CURRENT_CLICKED_PROFILE_ID Then oIds.Add(oRow.item("DocId")) - oCount += 1 End If Next End If - If oIds.Count = 0 Then - End If ' ----------------------------- If oIds.Count = 0 Then