Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 07, 2009 12:10 PM by sjnaughton
Aug 05, 2009 08:34 AM|LINK
I am using a Linq to SQL dbml that has a table with a self referencing association. So I am using a primary key TestId that is the one and TestIdKey that is the many. The grid display for the list page shows everything correctly. I can see a parent link
or children links. If the record is the top level parent then nothing shows up.
My problem is the generated filter will display all the records. I would have thought that it would start out with just the top level parents ( those records with a TestIdKey = 0 ) and when you select one, you would then see all the children in the filter
with maybe one select option to go back up a level as you drilled down.
Any thought on this behaviour or how to accomplish this easily?
ASP.NET Dynamic Data
Aug 05, 2009 01:14 PM|LINK
Hi Breadtruck, is this similar to the Employee table in Northwind?
Aug 05, 2009 01:29 PM|LINK
Yes that would probably be a real good example. I do have more records at the top level where the TestIDKey = 0, I think the Northwind example you start out with just one Employee at the top, correct?
Aug 05, 2009 02:40 PM|LINK
Yes I've just tried that in Northwind and it seems to work fine.
Aug 05, 2009 03:01 PM|LINK
How would I go about fixing my problem, do any of the samples with preview 4 show how it is supposed to be setup. Like I said everything within the grid works from a parent >> child perspective.
ASP .NET Dynamic Data
Aug 05, 2009 03:30 PM|LINK
I think I misread your first post does the filter work for you and it's not getting a default value?
Aug 05, 2009 03:53 PM|LINK
When I first go to the list page after picking the table I see all the possible items (500 or so), even though I really only want to see the top level parents (10-20 records) and by picking one of these I would expect that I would see the children in the
drop down list that belong to the parent that I just picked. I would basically be able to drill down all the way to the last set of children.
I can drill through the Hierarchy from the foreign key links on the grid. I can go up or down when appropriate. Just can't filter the initial top level items. Hope that makes sense.
Dynamic Data .net c# asp.net
Aug 05, 2009 04:58 PM|LINK
You would need a custome filter for this and to get custom filters you would need either Preview 4 or the old Futures project. I have created somthing like this based on the old futures project.
What I did what create a new dropdown list of the children when a parent is elected at each level. I wouldn;t waste my time with the old Futures project I would go with Preview 4 as this offers the best path for the future.
Aug 06, 2009 01:10 AM|LINK
So the northwind example does not really work the way I would want it to? There is no way into tricking the system without doing a custom filter?
Aug 06, 2009 08:37 AM|LINK
Sorry no I missunderstood your first post [:(] the only thing you could do in the current version is pass in the roo pk in the query string and then filter down from there but at each level you would have ALL values in the filter. With Preview 4 creating
a custom filter should be trivial though.