Sync a WinForm with DatagridView
Posted
by Ruben Trancoso
on Stack Overflow
See other posts from Stack Overflow
or by Ruben Trancoso
Published on 2009-11-02T01:33:25Z
Indexed on
2010/05/23
2:00 UTC
Read the original article
Hit count: 391
I have a Form with a DataGridView which DataSource is a BindingSource to a table. This view will have a single row selection and a button to delete, edit the current selected row in a popup Form and a insert button that will use the same Form as well.
My question is how can I sync the pop Form with the current row?
I tryied to use the RowStateChanged event to get and store the current selected Row to be used in the Form but I coudnt. After the event I get the row that was selected before.
Other thing I dont understand yet in C# how to have a single recordSet and know wich is the current record even if its a new being inserted in a way that once in the Form all data being entered will show up at the same time in the DataGridView.
© Stack Overflow or respective owner