Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# get distinct values all fields from list

if (!IsPostBack) {  
       GridView1.DataSource = GetProducts()
                              .GroupBy(o => new { o.Make, o.Model })
                              .Select(o => o.FirstOrDefault());
       GridView1.DataBind();
}
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #distinct #values #fields #list
ADD COMMENT
Topic
Name
9+9 =