T
Trevor
Hi
I have written a database winform app, and it performs well in testing.
When I installed the app onto my client's site I get an exception on
removing a new row that has been added to the table rows collection,
i.e.cancelling a new row.
The table is loosely bound to a data grid, the grid cells being populated by
code, and the error blanks out the Data Grid in white with a red cross. The
exception raised is "No value at Index 0" This is raised by the
system.windows.forms.Currencymanager.get_item(int32 index) inresponse to the
System.Windows.Forms.DataGridRow.PaintHeader event.
I have tracked the exception to be in response to the remove method of the
table rows.
The code I use to add the row is
drNewRow = Table.NewRow();
Table.Rows.Add(drNewRow);
and the code to remove the row is
Table.Rows.Remove(drNewRow); <- exception raised here. Commenting out this
row removes exception.
drNewRow = null;
I do not get this in the Windows XP Pro test environment, but a new Windows
XP Pro installed test machine has the same problem. I am using the same
user with both machines. The client tells me that the exception goes away
after a number of rows have been added to the SQL Server database.
Does any one know the basis of the problem, and how to fix it?
Thanks
Trevor
I have written a database winform app, and it performs well in testing.
When I installed the app onto my client's site I get an exception on
removing a new row that has been added to the table rows collection,
i.e.cancelling a new row.
The table is loosely bound to a data grid, the grid cells being populated by
code, and the error blanks out the Data Grid in white with a red cross. The
exception raised is "No value at Index 0" This is raised by the
system.windows.forms.Currencymanager.get_item(int32 index) inresponse to the
System.Windows.Forms.DataGridRow.PaintHeader event.
I have tracked the exception to be in response to the remove method of the
table rows.
The code I use to add the row is
drNewRow = Table.NewRow();
Table.Rows.Add(drNewRow);
and the code to remove the row is
Table.Rows.Remove(drNewRow); <- exception raised here. Commenting out this
row removes exception.
drNewRow = null;
I do not get this in the Windows XP Pro test environment, but a new Windows
XP Pro installed test machine has the same problem. I am using the same
user with both machines. The client tells me that the exception goes away
after a number of rows have been added to the SQL Server database.
Does any one know the basis of the problem, and how to fix it?
Thanks
Trevor