hello all, i have been pulling my hair out over this one for an entire day,
so i hope someone might know what i'm talking about. i actually found
someone else with the same problem and it saves me some typing to just give
you the link to that whole discussion:
anyway, the problem is that, when using a strongly typed DataSet, DataTable
and DataRow, when a NULL value is encountered, an invalid cast exception is
thrown. the exception is thrown by the strongly typed DataSet class, which
is of course automatically generated by .NET based on an XSD file that i
create. so, manually editing that class is counter-productive.
it is easy to catch this exception, or even to avoid it by retreiving the
value in different ways. the main problem is that it can't be bound to a
DataGrid as-is because this exception will occur. so, all of the
work-arounds are great when you are dealing with a single row and a single
value. but if you're trying to bind it to a user control, it doesn't work.
does anyone have experience with this particular problem? i would like to
hear how you are dealing with it.