This is a migrated thread and some comments may be shown as answers.

[Solved] Linq-to-SQL EntitySets

0 Answers 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
adsf adsf
Top achievements
Rank 1
adsf adsf asked on 03 May 2010, 03:38 PM
I want to be able to bind to a linq-to-sql entity that has a one to many relationship.  I want one of the columns to have only the first record on the many side.  I have tried this code which does not seem to be doing what I need.  How can I make this sortable and filterable on this record (see the second column below)?

    <%= Html.Telerik().Grid(Model) 
        .Name("ProjectsGrid"
        .Columns(columns => 
            { 
               columns.Bound(o => o.Name); 
               columns.Bound(o => o.ProjectsProjectTypes).Template(o => o.ProjectsProjectTypes.First().ProjectType.Name.ToString()); 
               columns.Bound(o => o.Sponsor); 
               columns.Bound(o => o.EnteredBy); 
               columns.Bound(o => o.QualityRank.Designation).Column.Title = "Quality Rank"
               columns.Bound(o => o.SafetyRank.Designation).Column.Title = "Safety Rank"
               columns.Bound(o => o.BusinessRank.Designation).Column.Title = "Business Rank"
           }) 
           .Pageable() 
           .Sortable() 
           .Filterable()  
 
            %> 
 

Tags
Grid
Asked by
adsf adsf
Top achievements
Rank 1
Share this question
or