开发者

Error using Dynamic Data Filtering: missing datasource

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 o开发者_开发百科f 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.


have you looked at the sample project you get when you download the source code.

Have a look at my blog post here Dynamic Data Filtering – Installation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜