Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Achieving 3 level hierarchy

Last post 07-17-2008 4:32 by itsEd. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-16-2008 6:35

    • itsEd
    • Not Ranked
    • Joined on 07-15-2008
    • Points 75

    Achieving 3 level hierarchy

    My problem is this.

    Say, I got a list of customer, who inturn will have list of orders. Each order will have orderdetails list inside it.

    I want to display the above information in a hierarchial fashion.

    The solution has to look like this.

    Customer

                        Order

                                        OrderDetails.

    I created a typed dataset with customer as parent, order as a child of customer and orderdetails as child of order.

    In the UI, i created 3 bands respectively. When I bind the data, I can see only the first two band details. i.e. Customer and order. I couldn't see the orderdetails information. How can I achieve this? Any samples will be of great help?

    • Post Points: 50
  • 07-16-2008 7:49 In reply to

    Re: Achieving 3 level hierarchy

     

    Hello,

    I am trying to reproduce the issue, unfortunately to no avail... when bind UltraWebGrid to strong type dataset I display  data normally (hierarichical). I use Northwind data base. Please, find attached project and If this doesn't help, please provide additional information.

    Hope this helps.

     

    Best Regards,
    Ivan Baev
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 07-16-2008 10:27 In reply to

    • WombatEd
    • Top 10 Contributor
    • Joined on 10-30-2007
    • Culver City, CA
    • Points 8,073

    Re: Achieving 3 level hierarchy

    The most common mistakes I've seen are:

    • Failure to define the relationships within the DataSet
    • Failure to populate all the tables in the DataSet

    I have an example of binding to a four-level DataSet (not strongly typed) posted at:

    http://forums.infragistics.com/forums/p/3298/17902.aspx#17902

     

    HTH

    Let me know if my post is a "hit" or a "miss" - use the "Answer" button and the star ratings.

    Edward McCarroll
    Applications Developer
    (Available for Hire - Contact Me)

    • Post Points: 20
  • 07-16-2008 10:40 In reply to

    Re: Achieving 3 level hierarchy

    Answer

     

    Hello,

    When you bind strong types dataset to UltraWebGrid you have to fill the instance of dataset through adapters and then just bind to grid, but if you have observation of some issue that show often you can submit at that link:

    http://devcenter.infragistics.com/Protected/SubmitSupportIssue.aspx

    Hope that helps.

     

    Best Regards,
    Ivan Baev
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 07-16-2008 12:55 In reply to

    • Patrick
    • Top 50 Contributor
    • Joined on 12-06-2007
    • Albuquerque, NM
    • Points 2,081

    Re: Achieving 3 level hierarchy

    Retrive data and create relationships ex: 

    Dim str_SQl As String = "spToGetHeaders"

    Dim myCommand As SqlCommand = New SqlCommand(str_SQL, yourSqlConn)

    myCommand.CommandType = CommandType.StoredProcedure

    Example of setting up relationships in the dataset (vb):

    ds_BO_Headers_and_Lines.Tables.Add("Headers")

    ds_BO_Headers_and_Lines.Tables.Add("LineItems")

    ds_BO_Headers_and_Lines.Tables.Add("BOPO")

    Try

    sqlConnApps.Open()

    'Retrive Header datatable

    Dim myDA As SqlDataAdapter = New SqlDataAdapter(myCommand)

    myDA.Fill(ds_BO_Headers_and_Lines.Tables("Headers"))

    'Retrive LineItem DataTable

    str_SQl = "SPtogetLineItems"

    myCommand.CommandText = str_SQl

    myDA.Fill(ds_BO_Headers_and_Lines.Tables("LineItems"))

    'Retrive BO PO DataTable

    str_SQl = "spTogetBoPos"

    myCommand.CommandText = str_SQl

    myDA.Fill(ds_BO_Headers_and_Lines.Tables("BOPO"))

    'Build relationships between tablesds_BO_Headers_and_Lines.Relations.Add("BO_Lineitems", ds_BO_Headers_and_Lines.Tables("Headers").Columns("Invoice"), ds_BO_Headers_and_Lines.Tables("LineItems").Columns("Invoice"))

    ds_BO_Headers_and_Lines.Relations.Add("BO_POs", ds_BO_Headers_and_Lines.Tables("LineItems").Columns("WHDP"), ds_BO_Headers_and_Lines.Tables("BOPO").Columns("WHDP"))

     

    Sometimes I have seen a band not displaying becuase of data issues like non-unique data in the columns used to form the relationships.

    Hope it helps.

    Patrick

    • Post Points: 5
  • 07-16-2008 21:06 In reply to

    Re: Achieving 3 level hierarchy

    a) What version are you using?

    b) Does each "Order" have corresponding "OrderDetails"?

    If you are using 8.1, there was a very obscure bug in that release where (if memory serves) if the first Order record the grid encountered while binding did not have any associated OrderDetails, then the third band would not show, even though it should.  If the first Order encountered had associated OrderDetails, then everything was fine, even if subsequent Orders did not have associated OrderDetails.

    We fixed that in the first 8.1 hotfix, but you might check to ses if your running into that specific issue.

    Devin

     

    Product Manager :: Web Client
    http://www.infragistics.com

    http://blogs.infragistics.com/blogs/devin_rader/
    http://www.geekswithblogs.com/devin

    Infragistics Developer Support: http://www.infragistics.com/gethelp
    • Post Points: 5
  • 07-17-2008 4:32 In reply to

    • itsEd
    • Not Ranked
    • Joined on 07-15-2008
    • Points 75

    Re: Achieving 3 level hierarchy

    I got the problem.

    Though I have defined the relationship, the data didnt get populated.

    As a resut, I was able to see the first two hierarchy.

     

    • Post Points: 5
Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems