Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Container.DataItem.Row.GetChildRows Problem

Status
Not open for further replies.

julesH

Programmer
Oct 24, 2000
17
US
Hi,

I have the following code in an aspx file that I cannot get to work:

<asp:repeater id=&quot;MessageRepeater&quot; runat=&quot;server&quot;>
. . .
<asp:DataList id=&quot;CommentList&quot; style=&quot;Z-INDEX: 112; LEFT: 14px; POSITION: absolute; TOP: 520px&quot; runat=&quot;server&quot;
DataSource='<%# Container.DataItem.Row.GetChildRows(&quot;MsgComments&quot;) %>'>
</asp:DataList>
. . .
</asp:repeater>

The error I receive is:
CS0117: 'object' does not contain a definition for 'Row'

MsgComments is a relationship between two tables in my dataset that is connected to the repeater control.

Not sure what I'm doing wrong, thanks in advance??

JulesH
 
Thanks BoulderBum, I use DataBinder.Eval else where in my code. This code needs to set the DataSource of the DataList.

What I want to do here is pull out the rows that are related in a second table in the DataSet, to the current row in the first table of the dataset. This table is referenced to the first (that is the DataSource of the DataRepeater), via a FK constraint.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top