Technical support This forum is closed.
Version 1.x > Technical support > Transformation user controls View modes: 
User avatar
Member
Member
JeremyThake - 2/8/2006 10:17:38 AM
   
Transformation user controls
Is there a way of getting at the DataItem object e.g. <%# DataBinder.Eval(Container, "DataItem.Description") %>
in the code behind?

I'd like to be able to see the parent control of a repeater transformation to get information about it.

I have a 3 level deep nested repeater going on and I want the context of the 2nd level for the 3rd so can't use Functions.GetAliasPath() because that is of the page itself not in context of the nesting.

User avatar
Guest
admin - 2/8/2006 6:52:15 PM
   
Re: Transformation user controls
Hi Jeremy,

Could you please post more details on what you're trying to achieve and what code you are using?

Thank you very much.

Best Regards,

User avatar
Member
Member
JeremyThake - 2/9/2006 7:21:13 AM
   
Re: Transformation user controls
Basically it's utilising the shopping cart 'product' feature to sell an event for a particular age-group.

e.g.

Event
Date of event
Adult
Student

Concert
12/01/2007
Adult
Student
13/01/2007
Adult
Student

I have created this in the tree as so:


Event
EventDate
EventCost

Concert
12/01/2007
Adult
Student
13/01/2007
Adult
Student


So to display this I have a page template Events.aspx which has a repeater displaying the Events using the events\default.ascx transformation.
In Event\default.ascx there is a repeater that lists for an event it's EventDate's using EventDate\default.ascx.
In EventDate\default.ascx there is a repeater that lists for an event it's EventCost's using EventCost\default.ascx

The problem is getting the context for the repeater of the EventCost to know what EventDate the repeater is sitting in to filter by it.

The other problem with it is obviously you need seperate products (items in the tree) so that when they are added to the cart you can differentiate between the dates, not just by Adult/Student...it would be nice to have the date and type of ticket as attributes of the Event item.

Can you think of another way around this?

User avatar
Guest
admin - 2/11/2006 2:58:07 PM
   
Re: Transformation user controls
Hi Jeremy,

I would recommend you using a hierarchical repeater in this case. It's described in Developer's Guide -> Knowledge Base -> KB0015.

Please let me know if you need any help with that.

Best Regards,