RadPanelBar HeaderTemplate

5 posts, 0 answers
  1. Nishith
    Nishith avatar
    4 posts
    Member since:
    Sep 2011

    Posted 04 Oct 2011 Link to this post

    I have created a HeaderTemplate for RadPanel by inheriting from ITemplate interface and binding the RadPanelBar dynamically. My HeaderTemplate contains a label and a RadButton. I just wanted to handle the Button click event(server-side) inside the HeaderTemplate. Can you please help me on this ?

    I am able to handle the ItemClick event of the RadPanelItem but not sure how to handle the button click event separately. It will be great if you have some sample code for this.

    Thanks,
    Nishith
  2. Nishith
    Nishith avatar
    4 posts
    Member since:
    Sep 2011

    Posted 04 Oct 2011 Link to this post

    I have another question, suppose I have used a RadPanelBar in my page and for the selected Item I wanted to put an arrow image at the border of the RadPanelPanel item ? Can it be possible using CSS and let me know if you have any work around to achieve this kind of style. I have attached the sample style I wanted for selected RadPanelItem.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 05 Oct 2011 Link to this post

    Hi Nishith,

    You can refer to the following demo if you need to handle only the button click in the HeaderTemplate of the RadPanelBar. Considering your other question about the appearance of the RadPanelBar, in general we do not provide support for the look that you are trying to achieve. However, you could try to change the sprite image that is applied to the control and using the css classes of the RadPanelBar to adjust it according to your needs. Here are the classes that are used for the Header and for the arrow, for example and a help article that explains how you can customize the skin of the control:
    .RadPanelBar_Vista div.rpHeaderTemplate, .RadPanelBar_Vista a.rpLink {
        background-color: #A6D9F4;
        background-image: url("PanelBar/RootItemBg.png");
    /* the image that you can change */
        border-color: #E8F5FC;
    }

    .RadPanelBar_Vista .rpExpandable span.rpExpandHandle, .RadPanelBar_Vista .rpExpanded span.rpExpandHandle {
        background-color: transparent;
        background-image: url("PanelBar/Expandable.png");
    /* the arrow image that is used */
        background-repeat: no-repeat;
    }

    Best wishes,
    Kate
    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
  5. Nish
    Nish avatar
    5 posts
    Member since:
    Jun 2012

    Posted 25 May 2013 Link to this post

    Hi Telerik Team,

    The Demo link you have given above is showing how to open a RadWindow using javascript. But I need to handle the button click event on serverside.

    I am able to handle the ItemClick event of the RadPanelItem but not sure how to handle the button click event separately. It will be great if you have some sample code for this.

    Thanks,
    Nish
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 30 May 2013 Link to this post

    Hello Nish,

    You can create the header and/or content templates of the RadPanelItems on the server side and attach the event handler to the button in the header as desired. Here is a very good help article explaining how to achieve that. I also attached a very simplified runnable page that you can use as a start.

    Regards,
    Kate
    Telerik
    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
UI for ASP.NET Ajax is Ready for VS 2017