Categories Hierachy

  • Thread starter Thread starter A. Elamiri
  • Start date Start date
A

A. Elamiri

Hello,

I have a list of product categories and each category may or may not have
children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was thinking
of store the ID#'s and category names as well as parent ID's but actually
using an XML file to store the hierachy.
Would be an efficient way of doing this?

Thank you
 
Hi,

You can keep the parent ID as an attribute of the Category node, and filter
the XML for a particular value. I have no idea how efficient this solution
is though.
What I would do is create a DataSet with a Category table, including a
column ParentID , you can create a Foreign key to the same table to the ID
column then you could use some construction like DataRow.GetChilRows(
"Parent_FK" ); which return a DataRow[]

Hope this help,
 
I will do that, thank you

Ignacio Machin said:
Hi,

You can keep the parent ID as an attribute of the Category node, and filter
the XML for a particular value. I have no idea how efficient this solution
is though.
What I would do is create a DataSet with a Category table, including a
column ParentID , you can create a Foreign key to the same table to the ID
column then you could use some construction like DataRow.GetChilRows(
"Parent_FK" ); which return a DataRow[]

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


A. Elamiri said:
Hello,

I have a list of product categories and each category may or may not have
children and it goes down in a varying level of depth.
Now I have to pull this category information for navigation, I was thinking
of store the ID#'s and category names as well as parent ID's but actually
using an XML file to store the hierachy.
Would be an efficient way of doing this?

Thank you
 
Back
Top