Re: problem implementing IHierarchyData
- From: "Jeff" <it_consultant1@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Apr 2009 00:05:59 +0200
I've seen that example, but I don't fully understand it.
Take this code for example, taken from the example I posted a link to
previous post:
public IHierarchyData GetParent() {
foreach (Category category in Common.GetCategoryData()) {
if (category.CategoryId == this.ParentId)
return category;
}
return null;
}
When I implement IHierarchyData interface into my Category class, then I see
it as bad to all the time call BLL method to get the collection of
categories, in the code above GetCategoryData is called for each iteration
in the loop... I want to implement it so that I can choose between
retrieving the full tree (all categories), or just a branch.. So I need
somehow to send in that parameter....
any suggestions
.
- References:
- problem implementing IHierarchyData
- From: Jeff
- Re: problem implementing IHierarchyData
- From: sloan
- problem implementing IHierarchyData
- Prev by Date: Re: Where are project files?
- Next by Date: Re: How to test for NULL in this scenario?
- Previous by thread: Re: problem implementing IHierarchyData
- Next by thread: GridView Postback adds IDs to TD and TR Elements
- Index(es):