Last post Aug 07, 2009 12:10 PM by sjnaughton
Aug 05, 2009 08:34 AM|breadtruck|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|sjnaughton|LINK
Hi Breadtruck, is this similar to the Employee table in Northwind?
Aug 05, 2009 01:29 PM|breadtruck|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|sjnaughton|LINK
Yes I've just tried that in Northwind and it seems to work fine.
Aug 05, 2009 03:01 PM|breadtruck|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|sjnaughton|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|breadtruck|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|sjnaughton|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|breadtruck|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|sjnaughton|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.
Aug 06, 2009 11:50 PM|breadtruck|LINK
Would the zipped files that you sent me for "Restore List page filter settings after an update or insert" still apply in Preview 4. I guess I would go to preview 4 if it will make my life simpler. What do you think?
One caveat . . . I would rather have my List Page settings available after an update or insert before worrying about what values are showing up in the filter as in this particular case.
Aug 07, 2009 12:10 PM|sjnaughton|LINK
No not unless you called browser back somehow, the other solution is you could always stick the in session and then when you return to a list page after insert/edit it could be reset.