Error using Dynamic Data Filtering: missing datasource

Posted by sebastiaan on Stack Overflow See other posts from Stack Overflow or by sebastiaan
Published on 2010-05-10T09:07:24Z Indexed on 2010/05/10 9:14 UTC
Read the original article Hit count: 758

I am trying to use the ASP.NET Dynamic Data Filtering project, but I'm running into a problem during the configuration.

I'm following the instructions on the author's blog, and everything works like described. Then it tells me to change the datasource using the designer view. I am told to select the "GridDataSource" in the "Configure data source" wizard. This option is not there though.

I get all of the classes in my project, including the DataContext that was generated by Linq. When I choose "Show only DataContext objects", the dropdown ("Choose your context object:") is completely empty.

When I turn of the checkbox and choose my DataContext class, I get asked which table I want and all that. But, as the whole purpose of a Dynamic Data site is NOT to use one single table, that's not much help.

So I've looked at the instructions again and copied the resulting datasource from the example:

<asp:DynamicLinqDataSource ID="GridDataSource" runat="server" 
EnableDelete="True" EnableUpdate="True"></asp:DynamicLinqDataSource>

Which is exactly what I had, without the "WhereParameters" nodes in there.

Now, when I run the list page however, I get an exception about a missing datasource from the filtering component. Of course when I remove the DynamicFilterRepeater, it works again.

This is the meat of the exception:

[InvalidOperationException: Missing DataSource] Catalyst.Web.DynamicData.DynamicFilterRepeater.GetTable() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:74 Catalyst.Web.DynamicData.DynamicFilterRepeater.GetFilters() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:81 Catalyst.Web.DynamicData.DynamicFilterRepeater.OnInit(EventArgs e) in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:106

How do I make the DynamicFilterRepeater recognize my datasource?

I'm using VS2010 Pro, on a Win7 machine.

© Stack Overflow or respective owner

Related posts about asp.net-dynamic-data

Related posts about filtering