Anser,
Check out Q821175 -
http://support.microsoft.com/?id=821175. Thanks! Robert Gruen
Microsoft, VB.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "ANSER KHAN" <EMAILTOKHAN@YAHOO.COM>
| Sender: "ANSER KHAN" <EMAILTOKHAN@YAHOO.COM>
| Subject: CS0117: 'object' does not contain a definition for 'Row'
| Date: Tue, 16 Dec 2003 23:41:03 -0800
| Lines: 62
| Message-ID: <062001c3c471$1fbf5fd0$a501280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPEcR+/OkWJ5BKbTRitKsBy5wNpkQ==
| Newsgroups: microsoft.public.dotnet.distributed_apps
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.distributed_apps:7853
| NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.distributed_apps
|
| Using c# Im trying to nest a datalist with reader control.
|
| after executing parent command and child command ..I
| create a relationship b/n them and return the parent
| dataset.. but while picking values to show.. I get this
| error.. please help me.
|
| the code follows
| --------------------------------------------------
| file name="relations.aspx.cs"
| -----------------------------
| {
| SqlConnection cn = new
| SqlConnection(ConfigurationSettings.AppSettings
| ["constring"]);
| SqlDataAdapter da = new
| SqlDataAdapter("select * from Blog_messages",cn);
| //cn.Open();
| DataSet ds = new DataSet();
| da.Fill(ds,"messages");
|
| da.SelectCommand.CommandText="select * from
| Blog_comments";
| da.Fill(ds,"comments");
| ds.Relations.Add(new DataRelation
| ("rr", ds.Tables["Messages"].Columns
| ["MessageID"], ds.Tables["Comments"].Columns
| ["MessageID"]));
| relationList.DataSource = ds.Tables
| ["messages"].DefaultView;
| relationList.DataBind();
| }
| -----------------------------------------------------
| file name: relations.aspx
| ------------------------
|
| //picking data to show
| <form id="Relationship" method="post" runat="server">
| <asp:DataList id="relationList" style="Z-INDEX: 101; LEFT:
| 111px; POSITION: absolute; TOP: 128px" runat="server"
| Width="703px">
| <ItemTemplate>
| <asp:DataList ID=dt1 DataSource='<%# Binder.Eval
| (Container.DataItem.Row.GetChildRows("rr"))%>'
| Runat=server >
| <ItemTemplate>
| <p><%# DataBinder.Eval(Container.DataItem,"messageID")%
| ></p>
| </ItemTemplate>
| </asp:DataList>
| <p><%# DataBinder.Eval(Container.DataItem,"messageID")%
| ></p>
| </ItemTemplate>
| </asp:DataList>
| </form>
|
| when I run it it gives me the following error...
| CS0117: 'object' does not contain a definition for 'Row'
|
| what shud I do. thankx in advance.( pl cc to
| anser@knowledgepointsolutions.com)
|
|