InvalidCastException in DataGrid

  • Thread starter Thread starter Royce
  • Start date Start date
R

Royce

Hi,

I have a DataGrid on a WinForm into which I am loading a
DataSet with 1 record. I have try/catch blocks around all
of my code. When I click in any column of the new row, I
get an InvalidCastException reported as an unhandled
exception, with the additional information "Specified cast
is not valid". How can I trap this exception? How can I
find out where the invalid cast is? Any ideas what is
causing it?

Thanks,
Royce
 
from VS menu select "debug/exceptions" and select "break into debugger
when exception thrown" on the relevant exception
 
Back
Top