General information
Category:
The Mere Mortals .NET Framework
Title:
Error adding record when grid sorted
I have been trying for days to simply add a new record to the main business object without success and the problem seems to be related to whether or not the grid has been sorted before adding the record. In the sample C# Order App, I can select a customer and then add a new order without problems. If I sort the order grid on the OrderID column and add a record, I get the following error when saving:
"There is already an open DataReader associated with this Command which must be closed first."
After days or trying to debug this, I have given up. There are other problems that arise when the columns are sorted, such as positioning on the "last" row after adding a record but the last row will vary depending on the sorting column. When sorted on OrderID, the First row is the new record. When Not sorted, the Last row is the new record. This may be a trivial problem for an experienced .Net person but is causing me great problems. Can anyone help point me in the right direction?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only