Otis wrote:
The grid appears as readonly? Or do you change something but it doesn't appear changed?
The grid does not appear read only. I can add new records, update current records etc. However, when I click the update button that I made (the update button currently calls customer.SaveMulti(true)), nothing seems to save to the database. If I close the program and reopen it, none of the modified data was saved to the database. I do see the following sql commands being run:
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;BEGIN TRANSACTION [SaveMulti]COMMIT TRANSACTION
but it does not save anything. What I would like to happen is the following:
-
select a customer in the combo box and the appropriate orders in the grid show up (this works fine)
-
Modify an order (say by changing the frieght cost ) in the grid
-
Have the database updated with the changes to the database when the update button is pressed.
Right now the grid is modified but the changes are not reflected in the tables.
I am not sure if this helps any but I looked at the order right before I called SaveMulti using this code:
customers[3].Orders[0].Freight
customers[3].Orders[0].IsDirty
The result was that the freight shows the modified order and the row is marked as dirty - both as I expected. However, calling SaveMulti does not update the order to the database.
I noticed that calling
customers[3].Orders.SaveMulti( true );
causes the row to correctly update in the database. However, this is not what I need because I do not want to have to scan through the customer and order rows to find what orders for each customer have been updated.
Thanks for any help.
Greg