This project is read-only.

Help with using ItemDataSource?

Topics: Developer Forum
Mar 3, 2009 at 6:42 PM
How could I set ItemDataSource.Query at codebehind? It has very strange type N2.Persistance.Finder.IQueryEnding.

Mar 4, 2009 at 10:43 PM
Looking at the code it seems you need to set DataMember="Query" on the list control. I made an example over here.
May 10, 2009 at 8:45 PM

Is it possible to append query type methods to the ItemDataSource.. something like this (although this doesnt seem to work):

idsNews.CurrentItem = CurrentItem.Container;
idsNews.Query.MaxResults(CurrentItem.MaxNews).Select();

I get null reference errors, but I thought it kind or made sense since the item data source is still N2 related I thought I could filter it down so to speak. :(

May 10, 2009 at 9:38 PM

Sorry. It doesn't work that way. It's either currentitem or Query. I know, it should have been 2 data sources instead.