You are usgn linq in wrong way that's why it did not working
LINQ query should be work on collection not with girdview control filter like you are using .
You need to first get linq query with where clause to filter result collection than you bind that collection with gridview control
something like this
string[] cities = { "London", "Amsterdam", "San Francisco", "Las Vegas",
"Boston", "Raleigh", "Chicago", "Charlestown",
"Helsinki", "Nice", "Dublin" };
GridView1.DataSource = from city in cities
where city.Length > 4
orderby city
select city.ToUpper();
GridView1.DataBind();