We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

InvalidCastException in DataGrid

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

Loader.
Live Chat Icon For mobile
Up arrow icon