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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14763 |

    Hi, Sorry for distrubing repeatedly, I dont have option. Is there any demo that can explain me how I can add detail grid rows dynamically, retrive data from the grid as well as detail grid. If not can any one explain how that happens, i will tell an example why i need this.
    If i click the check box in the parent grid i need to show two rows in detial grid other wise only one.
    Thanks AndreC, the reply sent , helped me. I still need ur help to do the rest. I tried adding detail grid row dynamically and even retrive data from the detail grid.
    Thanks in Advance,
    Naresh

    Imported from legacy forums. Posted by Naresh (had 2023 views)

    User (Old forums)
    Member
    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”
    Next
    row.EndEdit()
    </i>
    To retrieve a row, you can do the same, if the row you want is the selected one :
    <i>
    Dim row1 As Xceed.Grid.DataRow = CType( GridControl1.CurrentRow, Xceed.Grid.DataRow )
    </i>

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.