Categories Hierachy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • A. Elamiri

    Categories Hierachy

    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


  • Ignacio Machin

    #2
    Re: Categories Hierachy

    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.GetChil Rows(
    "Parent_FK" ); which return a DataRow[]

    Hope this help,

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


    "A. Elamiri" <abdellahNOSPAM @NOSPAMnexnevo. com> wrote in message
    news:D2bab.9283 $hl4.3861@nwrdn y01.gnilink.net ...[color=blue]
    > 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[/color]
    thinking[color=blue]
    > 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
    >
    >[/color]


    Comment

    • A. Elamiri

      #3
      Re: Categories Hierachy

      I will do that, thank you

      "Ignacio Machin" <ignacio.mach in AT dot.state.fl.us > wrote in message
      news:urBtFZefDH A.1764@TK2MSFTN GP09.phx.gbl...[color=blue]
      > Hi,
      >
      > You can keep the parent ID as an attribute of the Category node, and[/color]
      filter[color=blue]
      > 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[/color]
      ID[color=blue]
      > column then you could use some construction like DataRow.GetChil Rows(
      > "Parent_FK" ); which return a DataRow[]
      >
      > Hope this help,
      >
      > --
      > Ignacio Machin,
      > ignacio.machin AT dot.state.fl.us
      > Florida Department Of Transportation
      >
      >
      > "A. Elamiri" <abdellahNOSPAM @NOSPAMnexnevo. com> wrote in message
      > news:D2bab.9283 $hl4.3861@nwrdn y01.gnilink.net ...[color=green]
      > > Hello,
      > >
      > > I have a list of product categories and each category may or may not[/color][/color]
      have[color=blue][color=green]
      > > children and it goes down in a varying level of depth.
      > > Now I have to pull this category information for navigation, I was[/color]
      > thinking[color=green]
      > > of store the ID#'s and category names as well as parent ID's but[/color][/color]
      actually[color=blue][color=green]
      > > using an XML file to store the hierachy.
      > > Would be an efficient way of doing this?
      > >
      > > Thank you
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...