Item template and content template

2 posts, 0 answers
  1. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 09 Aug 2012 Link to this post


    Hi,

      In Rad Panelbar we have an option to select the tempalte either  ItemTemplate or ContentTemplate. Which one is the best option to select as a Template. What is the difference in both these templates?.,   What are the difficulties occur when we are using these templates in ajax?


    Thanks,
    Velkumar.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Aug 2012 Link to this post

    Hi Velkumar,

    Item Template contains the content appears in the panel item immediately below its text. The item cannot be collapsed nor expanded. If the item does not have any text, then the contents of the Item Template become the item itself. Content Template contains the content renders as a sub-group of the target panel item. The item can be expanded and collapsed as if it had child panel items. If the item does not have text, the contents of the Content Template become the item itself and cannot be expanded/collapsed.

    RadPanelBar has items with content templates you can access the controls embedded in the content templates directly by ID, regardless of the level of the template itself.RadPanelBar has items with item templates that have embedded controls, you may want to access the properties of those embedded controls. To get a reference to the embedded control, locate the RadPanelBarItem that has the item template, and use its FindControl method.

    Please take a look into the following documentations fore more information.
    Templates Overview
    Accessing Controls Inside Templates

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top