Home Forums WinForms controls Xceed Grid for WinForms detail Grid Reply To: detail Grid

User (Old forums)
Post count: 23064

This is because you are using the DetailGridTemplates collection, which is, as its name mentions, a template. This does not give you access to the actual instances of the DetailGrids. To gain access to a specific instance of a DetailGrid, you need to first get an instance of the DataRow to which the DetailGrid is attached, and then loop through the collection of DetailGrids on that row, and then the row.Cells(0).Value will return valid values.

//So first loop through the rows
For Each row as Xceed.Grid.DataRow In Me.grdTTHC.DataRows

//Then do as you did, but on the main row
For Each detail as DetailGrid In row.DetailGrids

If detail.Tag = DetailTree Then

For Each row As Xceed.Grid.DataRow In detail.DataRows

End If

Imported from legacy forums. Posted by André (had 212 views)