views:

173

answers:

1

Here's what I'm doing:

  1. I have (2) DataGridView controls
  2. DGV #1 is bound to the DataSet, DGV #2 is bound to a DataView of the SAME DataSet

Now, what I'm needing to accomplish here is this: When a user checks a boolean column on the original DGV, the second DGV should now display the newly checked row also.

The context is that the first DGV is a master list, and the second one is a "favorite" view of the first.

When I check the rows, the favorite column does NOT update. Do I need to use a DataAdapter to actually update the database, or can I operate directly on the DataSet (DataTable) -- or even with the Rows in the original DataGridView?

A: 

Figured this one out after a little more experimenting. Previously, I had been modifying the rows in the DataGridView, but to get them to propagate over into the "favorites" DataGridView, I had to call an AcceptChanges() method on the original DataSet. Like this:

dsInformation.AcceptChanges();

Evidently, this step is necessary for the newly toggled boolean field to update.

C. Griffin