DataView.Find not working with GUID
- From: "Warren J. Hairston" <whairston@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Nov 2006 00:30:26 -0500
Using .NET 2.0, I have a DataView with two columns: JobID (a GUID) and
JobNumber (an integer). DataView.Sort = "JobID".
When I perform a DataView.Find(SomeJobID), I always get a result indicating
the row was found, but it's the wrong row (code below). In the code below,
as long as JobID is a valid GUID, the Offset is always the wrong row.
This code seems to fail only when the DataView.Sort is a GUID - works fine
on other types of data.
Any ideas? Is this a bug in .NET 2.0? I've seen this same problem described
elsewhere on the Internet, but no responses or answers.
Thanks in advance,
Warren
Offset = DV.Find(JobID);
if (Offset > -1)
{
JobNumberText = DV[Offset]["JobNumber"].ToString();
} //JobID was located
.
- Follow-Ups:
- Re: DataView.Find not working with GUID
- From: Dave Sexton
- Re: DataView.Find not working with GUID
- Prev by Date: Re: DeriveParameters
- Next by Date: [Datagrid Onclick Error]
- Previous by thread: Re: RowFilter date expression
- Next by thread: Re: DataView.Find not working with GUID
- Index(es):
Loading