,I have problems binding both a telerik RadGrid and a plain vanilla
ASP.NET GridView to the results of the following LINQ to entities
query. In both cases the grids contain the correct number of rows, but
the data from only the first handful of rows is duplicated in all the
other rows. I'm directly assigning the return value from this code the
the DataSource property on the grids.

        DirectoryEntities dents = new DirectoryEntities();
        return from dp in dents.DirectoryPersonEntrySet
               where
                    dp.LastName.StartsWith(searchTerm) ||
                    dp.Extension.StartsWith(searchTerm)
               orderby dp.LastName, dp.Extension
               select dp;

Example, the query, when run in LinqPad, and under translation in SQL
Server, returns 65 unique records, but the ASP.NET GridView repeats
the first records all over the 65 rows it renders:

Raaff,Andre,7958
Rabie,Hermien,7719
Rabie,Hermien,8286
Rabit Lab, 6648
Rabodiba,Kgaugelo,3444
Radebe,Andries,6438
Rabie,Hermien,8286
Rabie,Hermien,7719
Raaff,Andre,7958
Rabie,Hermien,7719
Radebe,Andries,6438
Radebe,Andries,6438
Rabit Lab, 6648
Rabie,Hermien,8286

===================================
View archives and manage your subscription(s) at 
http://peach.ease.lsoft.com/archives

Reply via email to