I just using a simple LINQ query having group by clause and trying to bind its result set to GridView. My LINQ query looks like
var expData = from c in WebDB.Tra
expData is a string as you've put the LINQ query inside quotation marks.
expData
string
var expData = "from c in WebDB.TransTable group c by c.enterdate into g select g;"
System.String does not have a property called Key, hence the error.
System.String
Key
If you remove the quotation marks it should all work fine.