ASPX templates
Version 2.x > ASPX templates > Master / Detail Transformation View modes: 
User avatar
Member
Member
Mark - 7/12/2007 4:04:50 PM
   
Master / Detail Transformation
Does anyone have an example of how to create a transformation or use controls to create a list similar to this?

Master Record
Detail record
Detail record
Detail record

Master Record
Detail record
Detail record

Any help is greatly appreciated. If I figure it out I'll post a reply explaining it.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 7/13/2007 11:05:25 AM
   
RE:Master / Detail Transformation
Hi Mark,

I think you could achieve this by nested repeater. The outer repeater would display Master records and nested repeater would display Detail records for each Master Record. You can find example how you can use nested repeater at: http://www.kentico.com/docs/webpartsandcontrols/cmsrepeater.htm

Best Regards,
Martin Dobsicek

User avatar
Member
Member
markbonafe@bpsvc.com - 7/13/2007 4:29:29 PM
   
RE:Master / Detail Transformation
Thanks Martin. That worked great!

User avatar
Member
Member
Marco - 1/7/2008 1:22:08 AM
   
RE:Master / Detail Transformation
Hi,

I am using this option too. I have 2 menu's, 1 mainmenu and another menu which is displaying the submenuitems with the main menu-item on top.

For example
<ul>
<li><span>Knowledge</span></li>
<li><a href="#">Technical</a>
<li><a href="#">Functional</a>
<li><a href="#">Testing</a>
</ul>

This menu should only appear when clicked on an item on the main menu or within the submenu.

I am working with path .. the wherecondition nodelevel = 1 and the transformation
<li><span><%# Eval("DocumentName")%></span></li>
<cc1:CMSRepeater ID="CMSRepeaterIDSubmenuItems" runat="server" ClassNames="cms.menuitem" TransformationName="CMS.MenuItem.SubMenu">
</cc1:CMSRepeater>

It works when I click on a submenu item, but not on a mainmenuitem then the menu is empty, when I remove the wherecondition I get all menu and submenu-items instead of the mainmenu item and its children.

The other issue is because I the repeater instead of cmslistmenu because of the parent item, I do not have the class CMSListMenuHighlightedLI to style the element.

Is it possible with the CMSListMenu to start with the parentnode styled as text before the childnodes? If so do you have an example?

Regards,
Marco

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/29/2008 3:52:02 PM
   
RE:Master / Detail Transformation
Hi,
could you please try to add a path proerty to your repeater and specify the path to the sub-items. also you can try to use Maximum nesting level and/or Show for document types properties.

Regarding to the CMSListMenu - could you please describe your issue with more details? Maybe it will be better if you will send an e-mail to support@kentico.com (if you haven't send it already :-))

Best Regards,
Juraj Ondrus

User avatar
Member
Member
affandy - 12/15/2008 12:09:32 AM
   
RE:Master / Detail Transformation
hello Martin, this example not working for me

I Have 2 tables that relate

Table 1
CityID, CityName

Table 2
MerchantID, merchantName,CityID

I Want to make repeater and datalist like

City 1
Merchant 1
Merchant 2
Merchant 3

City 2
Merchant 1
Merchant 2

What I've to do ?
could you please give me tutorial step by step

Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/16/2008 8:33:17 AM
   
RE:Master / Detail Transformation
Hi,

If you would like to display data from database which are not documents in the content tree (or other parts of our system) then our controls and web parts are not desirable for this purpose. This functionality ensures standard ASP.NET controls. You could develop an User control (http://devnet.kentico.com/docs/devguide/adding_custom_code_to_the_page.htm) or a Web par (http://devnet.kentico.com/docs/devguide/developing_web_parts.htm) with your custom functionality.

ASP.NET documentation is e.g. here:[url= http://msdn.microsoft.com/en-us/library/w0x726c2.aspx] http://msdn.microsoft.com/en-us/library/w0x726c2.aspx[/url]

Maybe these instructions could help you:
1. http://support.microsoft.com/kb/306154
2. http://www.highoncoding.com/Articles/185_Nested%20Repeaters%20to%20Display%20Nested%20Data.aspx
3. http://www.dotnetspider.com/resources/744-Using-Nested-Repeater-Controls.aspx

or you could try to find some other sample codes with the help of Google.

Best Regards,
Helena Grulichova