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

RowSourceNeeded for a Template's Template

1 Answer 188 Views
GridView
This is a migrated thread and some comments may be shown as answers.
BECK
Top achievements
Rank 1
BECK asked on 07 Dec 2010, 06:19 PM
I want to load on demand for a RadGridView1 I have. I setup the GridViewTemplate1 as shown in the example provided here : 
http://www.telerik.com/help/winforms/gridview-hierarchical-grid-load-on-demand-hierarchy.html

Now I want to do the same to the child of the GridViewTemplate1. Everything was done exactly as the example provided again for the child's child but for some reason, when expanding the node (row), the event RowSourceNeeded doesn't fire (it only fires when the master templates rows are expanded). Why is that? 

 GridViewTemplatePolicyLines.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines)
        GridViewTemplateRules.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplateRules)
        GridViewTemplatePolicyLines.Templates(0).HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines.Templates(0))
 GridViewTemplatePolicyLines.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines)
        GridViewTemplateRules.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplateRules)
        GridViewTemplatePolicyLines.Templates(0).HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines.Templates(0))
 GridViewTemplatePolicyLines.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines)
        GridViewTemplateRules.HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplateRules)
        GridViewTemplatePolicyLines.Templates(0).HierarchyDataProvider _
            = New GridViewEventDataProvider(GridViewTemplatePolicyLines.Templates(0))
GridViewTemplate1.HierarchyDataProvider _
      = New GridViewEventDataProvider(GridViewTemplate1)
GridViewTemplate2.HierarchyDataProvider _
      = New GridViewEventDataProvider(GridViewTemplate2)

By the way, I already setup the GridView so that GridViewTemplate1 is the child of the master template. And GridViewTemplate2 is the child of GridViewTemplate1 but I didn't include the code for that here.

1 Answer, 1 is accepted

Sort by
0
BECK
Top achievements
Rank 1
answered on 07 Dec 2010, 07:31 PM
OK Never mind. I found out what the problem was. I forgot to add a relation between the child and its child. My bad :)
Tags
GridView
Asked by
BECK
Top achievements
Rank 1
Answers by
BECK
Top achievements
Rank 1
Share this question
or