Is this in System.Windows. Forms or in ASP.NET? If the answer is the
former, then the requirement is that the collection implement IList, not
IEnumerable. With ASP.NET, I think you ^should^ be able to bind an
IEnumerable to a data source, but you would have to check up on that.
Yes, is't a Win Forms app and I can bind other IEnumerables. Just not sure
why not this one. Here it is in case you notice anything:
Public Function GetProgramPrice ListByMedicineI d(ByVal MedicineId) As
IEnumerable
Dim y As IEnumerable(Of ProgramMedicine Price)
y = From pmp In dc.ProgramMedic inePrices _
Where pmp.MedicineId = MedicineId
Dim x As IEnumerable
x = From xy In y _
Where xy.ProgramMedic inePriceDate = (From test In y _
Where test.ProgramId =
xy.ProgramId _
Select
test.ProgramMed icinePriceDate) .Max _
Select xy.Program.Prog ramName, _
xy.ProgramMedic inePriceDate, _
xy.ProgramMedic inePriceDollars
Ron,
>
Is this in System.Windows. Forms or in ASP.NET? If the answer is the
former, then the requirement is that the collection implement IList, not
IEnumerable. With ASP.NET, I think you ^should^ be able to bind an
IEnumerable to a data source, but you would have to check up on that.
>
>
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard. caspershouse.co m
>
"Ronald S. Cook" <rcook@westinis .comwrote in message
news:23CF632B-2420-424F-B8B1-D0319513DAE3@mi crosoft.com...
>Does anyone know why an IEnumerable might not bind to a DataGridView?
>>
>Thanks,
>Ron
Comment