Clickable items inside panel bar

4 posts, 0 answers
  1. Jaime
    Jaime avatar
    12 posts
    Member since:
    Feb 2013

    Posted 08 Mar 2013 Link to this post

    I have a panel bar that is dynamically populated with items that represent answers to questions in a survey. The problem I am having is that the items (answers) are displayed inside an href tag which is not exactly what I want. How can I prevent the panel bar from adding an href tag to items inside?

    Thanks,

    Jaime
  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 13 Mar 2013 Link to this post

    Hi, Jamie.

    You can't really prevent the items from being rendered as links: you could use templates (templates render DIV elements), but that's as far as you can change items.

    On a related note, if using PanelBar is required for its collapsing capabilities, why not use content template with RadioButtonList inside? (See attached example.)

    Of course, if your scenario does not allow for the above solution, or PanelBar is required for other reasons and links (A elements) are note an option, templates are only solution.

    Regards,
    Ivan Zhekov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jaime
    Jaime avatar
    12 posts
    Member since:
    Feb 2013

    Posted 14 Mar 2013 Link to this post

    In my solution the data being displayed in dynamically loaded so could you suggest how to accomplish this in the codebehind?

    Thanks,

    Jaime
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 19 Mar 2013 Link to this post

    Hello,

    In order to achieve that functionality from the code behind, I would suggest adding templates at run-time. Here you may find a more information about it and some sample code illustrating that approach.


    Kind regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top