Gridview empty when SelectedIndexChanged called
- by xan
I have a DataGrid which is being bound dynamically to a database query. The user enters some search text into a text field, clicks search, and the code behind creates the appropriate database query using LINQ (searches a table based on the string and returns a limited set of the columns).
It then sets the GridView datasource to be the query and…