Hi Folks,
I want to add a child datarow to an existing datarow array - is this possible?
Basically I am looping through one datarow, using getchildrows to get each child and I want to return a datarow array of all the children.
It is the line 'rowChildren(shChildCnt) = rowChild' that I am struggling with. Thanks for any help on this!
shHasChildCount = 0
shChildCnt = 0
For Each rowParent In rowParents
For Each rowChild In rowParent.GetChildRows(sRelation)
If rowChild.RowState <> DataRowState.Deleted Then
'add the child row to the children rows
rowChildren(shChildCnt) = rowChild
shChildCnt = shChildCnt + 1
End If
Next rowChild
If rowChildren.Length > 0 Then
shHasChildCount = shHasChildCount + 1
End If
Next
Paul
I want to add a child datarow to an existing datarow array - is this possible?
Basically I am looping through one datarow, using getchildrows to get each child and I want to return a datarow array of all the children.
It is the line 'rowChildren(shChildCnt) = rowChild' that I am struggling with. Thanks for any help on this!
shHasChildCount = 0
shChildCnt = 0
For Each rowParent In rowParents
For Each rowChild In rowParent.GetChildRows(sRelation)
If rowChild.RowState <> DataRowState.Deleted Then
'add the child row to the children rows
rowChildren(shChildCnt) = rowChild
shChildCnt = shChildCnt + 1
End If
Next rowChild
If rowChildren.Length > 0 Then
shHasChildCount = shHasChildCount + 1
End If
Next
Paul