I'm following the example from https://www.telerik.com/forums/object-bound-hierarchy#711007, which describes how to create an object-based hierarchy. An excellent example.
I'm now trying to modify that example to look how I want, and I've done everything apart from the critical bit - adding the row of 'child' data.
For a normal row, I would do:
Dim gvdi As New GridViewDataRowInfo(myGrid.MasterView)
With gvdi
.Cells("name").Value = t.name
.Cells("status").Value = t.status
.Tag = t '...plus any other columns I need
End With
The example uses the simpler constructor for a new child row, like:
childTemplate.Rows.Add(t.id, tt.name, tt.status) '....where 't' is my object.
This also works fine
But now I'd like to use the first style of constructor for the child row, and I can't work out how to do it.
When I use the first bit of code, the runtime complains that it's not a GridViewHierarchyRowInfo, so I changed it to be:
Dim gvdi As New GridViewHierarchyRowInfo(myGrid.MasterView)
'With gvdi
.Cells("name").Value = tt.name
.Cells("status").Value = tt.status
.Tag = tt
End With
...and that doesn't work either. Is it the GridViewHierarchyRowInfo(myGrid.MasterView) which is wrong?
Any ideas?
Thanks