Hierarchies Grid for LightSwitch

3 posts, 0 answers
  1. Rashmi
    Rashmi avatar
    5 posts
    Member since:
    May 2011

    Posted 05 Aug 2012 Link to this post

    Hello Telerik Team

    I am trying to implement Hierarchy grid into lightswitch application. But unfortunately its not working. Only showing GroupBy Header of the grid. The parent grid is working properly without any error.
    Here is the my entity relationship
    InwardDetail can have many Cutting Instances.
    A Cutting must have a InwardDetail.

    I am attaching the sample xaml code what i am using.
    <telerik:RadGridView.ChildTableDefinitions>
                    <telerik:GridViewTableDefinition />
                </telerik:RadGridView.ChildTableDefinitions>
                <telerik:RadGridView.HierarchyChildTemplate>
                    <DataTemplate>
                        <telerik:RadGridView ItemsSource="{Binding Screen.Cuttings, Mode=TwoWay}" AutoGenerateColumns="False" telerik:StyleManager.Theme="Metro">
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding CuttingPart}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding CutLength}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding NoPieces}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding CuttingDate}" />
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" />
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>
                    </DataTemplate>
                </telerik:RadGridView.HierarchyChildTemplate>

    Kindly help me on this.
    Thanks
  2. Paul
    Paul avatar
    6 posts
    Member since:
    Jun 2010

    Posted 05 Sep 2012 Link to this post

    In your email, you indicate that this is how you bind the grid...  

        Parent Grid: ItemsSource=”{Binding Screen.InwardDetails, Mode=TwoWay}”

        Hierarchical Child Template: ItemsSource=”Binding Screen.Cuttings, Mode=TwoWay}”

    Not sure if it has anything to do with the binding. The Screen.Cuttings is a collection, but the query for the collection is not executed until an item from the "parent" collection is selected. 

    Maybe a Telerik person can provide a simple example of an implementation of a hierarchical grid specifically for LightSwitch?

    You may have already tried these references: 
      http://www.telerik.com/help/silverlight/gridview-basic-hierarchies.html 
      http://www.telerik.com/help/silverlight/gridview-how-to-create-hierarchical-grid-with-ria.html 

    Can someone from Telerik chime in here?

    Thanks a bunch,

    Paul P, C# MVP
    PaulSPatterson.com
  3. Rashmi
    Rashmi avatar
    5 posts
    Member since:
    May 2011

    Posted 05 Sep 2012 Link to this post

    Hi Paul

    Thank you for your reply. I have also go through your provided links.
    Waiting for some telerik brain or any experts to respond here.

    Thanks
    Rashmi Ranjan Panigrahi
Back to Top