Re: WPF/LinqToSql/DataGrid
- From: Pavel Minaev <int19h@xxxxxxxxx>
- Date: Wed, 6 May 2009 17:31:34 -0700 (PDT)
On May 6, 2:12 pm, Bill McCormick <wpmccorm...@xxxxxxxxxxxxxxxx>
wrote:
Selecting certain rows of data from my WPF datagrid (bound to a
LinqToSQL datasource) are generating exceptions that I'm not sure how to
handle.
It's a FormatException with message: String must be exactly one
character long, but I can't tell what it is about these records that is
causing the problem.
The only info I know how to get is the stack trace (below) and it's not
helping me.
[snip]
Looking at the stack trace, I have a strong feeling that WPF is not
even relevant here. What happens when you use the exact same LINQ
query and just enumerate the result completely, without databinding it
to anything?
I think what happens is that you have a divergence between your LINQ
to SQL-generated C# classes, and the database schema. Your class
probably has a "char" field, and the corresponding field of the table
contains strings that are longer than a single char.
.
- Follow-Ups:
- Re: WPF/LinqToSql/DataGrid
- From: Bill McCormick
- Re: WPF/LinqToSql/DataGrid
- References:
- WPF/LinqToSql/DataGrid
- From: Bill McCormick
- WPF/LinqToSql/DataGrid
- Prev by Date: Problem opening an .htm help file at an anchor
- Next by Date: Re: C# unzipping .ZIP files
- Previous by thread: Re: WPF/LinqToSql/DataGrid
- Next by thread: Re: WPF/LinqToSql/DataGrid
- Index(es):
Relevant Pages
|