|
-
Jun 24th, 2008, 05:48 PM
#1
[RESOLVED] Nested Repeater on Third Level Doesn't Work
Trying to nest a third level repeater, but I seem to be getting a "Public member 'Row' on type 'DataRow' not found." error. The first two nestings work correctly, but the third does not.
To summarize, I have three tables of data in the dataset, with relationships added, the parent being the first table, the child/second parent being table 2, and the final table3 being the final child table. The repeater is meant to show a file list, with each file having a group and category id. The repeater displays the groups, then the categories, then the files listed in each category for each group (like I said, the first two levels, the Groups and Categories is working)
I am not quite sure what the syntax is in source view to access the items at each level, and got lucky with the second level from reading a post and working on it for a little while.
The code for the source view in the nesting looks like this:
Code:
<asp:Repeater ID="rptAll" runat="server">
<ItemTemplate>
<p>Group: <%#DataBinder.Eval(Container.DataItem, "groupid")%></p>
<asp:Repeater ID="rptChildren" runat="server" DataSource='<%# container.dataitem.Row.GetChildRows("Groups_FileCategories") %>'>
<ItemTemplate>
<p>Category: <%#DataBinder.Eval(Container.DataItem, "[""CategoryID""]")%></p>
***************************
'third level nesting, where the problems are
***************************
<asp:Repeater ID="rptFiles" runat="server" DataSource='<%# container.dataitem.Row.GetChildRows("FileCategories_Files") %>'>
<ItemTemplate>
<p>Category: <%#DataBinder.Eval(Container.DataItem, "[""FileID""]")%></p>
</ItemTemplate>
</asp:Repeater>
****************************
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Now on the second level, I have no idea why categoryid needed "[""CategoryID""]" listed as the item instead of just "categoryid", but it wouldn't work the other way. Now I am thinking that the third level needs something extra, but since I don't really know what I'm doing, I'm not really sure what that is. I need to get the child rows for the second nesting to display the actual file in that category, but am receiving the error posted at the beginning.
Can anyone make any sense of this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|