Linq result data binding- How to change the column header?. Grid enabled with pagination and sorting. I am trying to change the column names with spaces for e.g. Companyname = Company Name. How to so this?
var finalResult = AllCompany.Select(i => new
{
noteLink = i.ID.ToString(), //1
editLink = i.ID.ToString(), //2
CompanyName = i.Fields["Company Name"].ToString(), //3
Address1 = i.Fields["Address Line 1"].ToString(), //4
})
.Distinct()
.OrderByDescending(i => i.CompanyName)
.ToArray();
GvResults.DataSource = finalResult.ToList();
GvResults.DataBind();