Passing values from datagrid to form and form to datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SanjayKumarDey
    New Member
    • Sep 2008
    • 2

    Passing values from datagrid to form and form to datagrid

    I have a vb.net datagrid bound to a dataview on a windows form. I want to
    use the datagrid to display and filter a list of items , but since the data
    is complex, I don't want the user to edit the item using the datagrid. I'd
    like to have another form display when the user double clicks the desired
    row in the datagrid, and have that form display details for the selected
    datagrid row.

    I'm having problems figuring out the best way to pass the selected row on
    the first form to the second form. All of the data (including data from
    related tables,) is already populated in the underlying dataset on the first
    form, so I'd like to pass the dataset also.When Second form will be opened. I would like to editi data on the Second Form. After the data edited on the second form one 'OK' button shuld be there on the second form.So that I would click the 'OK' button then the second form would be closed and the edited data of the second form should be reflected on the first form and then I save the first form with the edited data. Can anyone recommend the best
    and/or easiest way to accomplish this?

    Thanks!
    Sanjay Kumar Dey
Working...