I have found what I think is a bug in the Telerik MVC Grid control. I am using VS 2008 with MVC 2 and the Telerik 2010.1.416 build. I am running on Windows XP SP3 with all latest patches. I execute the following query to the database:
It works OK until I try to filter by state. When I do this, I get the following error:
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The state column in the database is not required, and in some cases is null (in case that matters).
In LINQPad, I am able to add .Where(o => o.state.Equals("WA")) after .Where(predicate) without getting any errors, and I get the correct information returned.
Adding .Where(o => object.Equals("WA", o.state)) also works correctly in LINQPad, as does adding an additional predicate:
predicate = predicate.And(o => o.state.Equals("WA")) or predicate = predicate.And(o => o.state.Equals("WA"));