Hierarchical GridView

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 19 Jun 2011 Link to this post

    I am new to Silverlight.

    I watched the demo of "Custom Hierarchy Template". I don't see anywhere defines order and details relationship.
    If I have 2 separate class (recordset), one for orders, one for details. I assume somewhere in the GridViewTableDefinition needs to define the relationship between 2 tables and also which field (orderid in order class) in parents table relates to which field (orderid in details table) in child table.

                    <telerik:GridViewTableDefinition />

    Why I don't see it's there. How do we know ues which order id pulls the order detail child grid for this order? 
    Shoud it add the relationship under  <telerikData:TableRelation.FieldNames> like the self reference example?

    Where is the code you get the orders and details class collection? I don't understand why the data can come without specify the relationship.

    I used Ajax radgrid before, when i used ajax radgrid, I got details recordset under Radgrid1_DetailTableDataBind, query on detail table by passing dataItem.GetDataKeyValue("ID") from parent grid. Should I do the similar thing in Silverlight radgridview? I am using mvvm for the radgridview. Is it possible  that you can give me a detailed example for how to set the relationship between order and detail to serve the radgrid in this case?

  2. Vlad
    Vlad avatar
    11100 posts

    Posted 20 Jun 2011 Link to this post


     The relation is already created in the view-model. The parent grid is bound to Orders and every child grid is bound to respective order detail. Please check the XAML for for more info. I suggest you also to check this blog post for example to know more how to create hierarchy in your model and later bind it to the grid.  

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top