Home Forums WinForms controls Xceed Grid for WinForms adding rows to master detail grid

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

    Hi all,
    Thanks for each and every reply. I am too busy not even able to thanks for the replys. Sorry for that
    I would like to ask one more question. How can i add rows to the master detail grid. when i delete the master row it is successfully deleting the detail grid also. But when comes for the adding, I tried to add like this master.datarows.addnew() and tried to count the rows in the grid it is giving correctly. but i am unable to see that row.
    can any one help me
    Thanks and Regards,
    Naresh

    Here is my code:

    Grid.DataRows.AddNew()
    MsgBox(Grid.DataRows.Count)
    Grid.Refresh()

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

    User (Old forums)
    Member
    Post count: 23064

    You need to call EndEdit on the row, so it is actually added it to the DataRows collection :
    <i>
    Dim row as Xceed.Grid.DataRow = Grid.DataRows.AddNew()

    row.EndEdit()
    </i>
    You can of course set the row before calling EndEdit().

    e.g.
    <i>
    Dim row as Xceed.Grid.DataRow = Grid.DataRows.AddNew()

    For Each cell In row.Cells
    cell.Value = “some value”
    Next

    row.EndEdit()
    </i>

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

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