This is a migrated thread and some comments may be shown as answers.

Hierarchies Grid for LightSwitch

2 Answers 28 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rashmi
Top achievements
Rank 1
Rashmi asked on 05 Aug 2012, 09:18 PM
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 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 05 Sep 2012, 01:52 PM

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
0
Rashmi
Top achievements
Rank 1
answered on 05 Sep 2012, 02:23 PM
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
Tags
GridView
Asked by
Rashmi
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Rashmi
Top achievements
Rank 1
Share this question
or