Home Forums WinForms controls Xceed Grid for WinForms Hi , Can I get any demo help regarding the grid Reply To: Hi , Can I get any demo help regarding the grid

User (Old forums)
Post count: 23064

Well, the actual implementation will depend on how you set up the grid, and when you want to add or access a row. What you need is to get an instance of the DetailGrid, then add a row.

e.g. :

//for example in the click event of the CheckBox <i>
Dim detailGrid As Xceed.Grid.DetailGrid
detailGrid = CType( GridControl1.CurrentRow, Xceed.Grid.DataRow ).DetailGrids( 0 )
Dim row As Xceed.Grid.DataRow = detailGrid.DataRows.AddNew()
Dim cell As Xceed.Grid.DataCell
For Each cell In row.Cells
cell.Value = “some value”
To retrieve a row, you can do the same, if the row you want is the selected one :
Dim row1 As Xceed.Grid.DataRow = CType( GridControl1.CurrentRow, Xceed.Grid.DataRow )

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