This is a migrated thread and some comments may be shown as answers.
Access under RadPanelBar
3 Answers 9 Views
This is a migrated thread and some comments may be shown as answers.
azhar
Top achievements
Rank 1
azhar asked on 12 May 2020, 01:25 PM

I have RadButtonLink  which fires method to download image from server side without refreshing the page, but this RadButtonLink located under RadPanelBar which make it unassailable, how to solve this issue? 

 

```

<asp:Content ContentPlaceHolderID="CPHMain" ID="Content1" runat="server"><div class="ChildBody"><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><Telerik:RadPanelItem runat="server" Expanded="false" Selected="true" Text="Virtual Card Display"><Items><Telerik:RadPanelItem runat="server" Value="VirtualCardDisplay"><ItemTemplate><div class="container1"><div class="box1"><div class="part-1" style="white-space: nowrap; flex: 0 0 25% !important"><asp:ImageButton ID="imgDownloadLarge" runat="server" Height="11pt" ImageAlign="AbsMiddle" ImageUrl="../../MasterTemplate/Images/download_png_icon.png" OnClientClick="lnkDownloadLarge_Click1" Width="11pt" ToolTip="Download image" /><Telerik:RadLinkButton ID="lnkDownloadLarge1" runat="server" CssClass="LinkAction" Text="Download Large Image" OnClick="lnkDownloadLarge_Click1"><Icon CssClass="rbDownload"></Icon></Telerik:RadLinkButton></div><div class="part-2" style="white-space: nowrap; flex: 0 0 75% !important"><asp:Label ID="lblLargeImageResponse" runat="server" ForeColor="Red" Text=" "></asp:Label></div></div></div></ItemTemplate></Telerik:RadPanelItem></Items></Telerik:RadPanelItem></ContentTemplate></asp:UpdatePanel></div></asp:Content>

```

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 15 May 2020, 10:56 AM

Hi azhar,

The RadLinkButton does not expose server-side OnClick event, thus it cannot be handled. Can you, please, explain in a little bit more details the exact moment in which you have used to trigger the assigned dowloading functionality?

If you just need to access the LinkButton by its ID on the server-side, you can see how to to that in a PanelBar scenario here:

https://docs.telerik.com/devtools/aspnet-ajax/controls/panelbar/templates/accessing-controls-inside-templates

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
azhar
Top achievements
Rank 1
answered on 15 May 2020, 02:02 PM
Hi Vessy
Thanks for response, I solved the problem but I will explain what I got through and what I have learnt about the radPanelBar
First I used RadButtonLink under the RadBanelBar and then I discoverd that as you said it" RadButtonLink  does not expose server-side OnClick event, thus it cannot be handled", then I replaced it with RadButton and make onClick on it to install an Image and used a <Trigger> tag to controle postback for this radbutton but it didn't work because the trigger cannot see the radbutton when it is under RadPanelBar, so what I did is"<Triggers><asp:PostBackTrigger ControlID="RadPanelBar2" /></Triggers> " I passed the Id of RadPanelPar2 which is my button located under it inside PostBackTrigger and it worked for me.
0
Vessy
Telerik team
answered on 20 May 2020, 06:56 AM

Hi azhar,

Thanks a lot for the update - I am really glad you have manged to achieve the target result and can confirm that the solution found by you is the proper way to update the child controls of RadPanelBar via RadAjaxManager.

Kind regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Asked by
azhar
Top achievements
Rank 1
Answers by
Vessy
Telerik team
azhar
Top achievements
Rank 1
Share this question
or