Robinsonx6
asked on
Urgent: Using a Repeater getting the rowdata
Hi iam trying to pass the underlying data of an ASP:Repeater item to a custom control which will be used to format the Repeater,as follows:- How do i do this correctly so i can access the Items data within my control. PS you will notice i have a public property in my ItemControl called ItemData which im hopeing can be passed a DataRow.
<asp:Repeater id="rptrLocations" runat="server">
<ItemTemplate>
<cc3:Item id="Item1" ItemData="?????????????" runat="server"></cc3:Item> // this is my custom control
</ItemTemplate>
</asp:Repeater>
<asp:Repeater id="rptrLocations" runat="server">
<ItemTemplate>
<cc3:Item id="Item1" ItemData="?????????????" runat="server"></cc3:Item>
</ItemTemplate>
</asp:Repeater>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry i get the following error
Parser Error Message: Cannot create an object of type 'System.Data.DataRow' from its string representation '<# ((DataRowView)Container.Da taItem).Ro w #>' for the 'ItemData' property.
Parser Error Message: Cannot create an object of type 'System.Data.DataRow' from its string representation '<# ((DataRowView)Container.Da
<%@ Import Namespace="System.Data" %>
[C#]
<cc3:Item id="Item1" ItemData='<%# ((DataRowView)Container.Da
[VB.NET]
<cc3:Item id="Item1" ItemData='<%# DirectCast(Container.DataI
ASKER