Thanks that helped, but now I have run into another problem of "Object Reference not set to instance of object" which is caused by the WebDataGrid.
The exception details say "System.NullReferenceException" and this is the source error
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I have tried putting new before I define my datasource for the webdatagrid, but that doesn't seem to help either.