This is a migrated thread and some comments may be shown as answers.

need to add AsyncPostBackTrigger

1 Answer 180 Views
Dock
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 06 May 2011, 03:28 PM
Hello,

I am following the my portal demo. I have created app with similar functionality.

I have combobox with treeview embeded in it. On clicking tree nodes I add the Docks to the raddockzone.

Now I want to add "AsyncPostBackTrigger " to the treeview  which is inside the combobox so that when I hit "NodeClick" event then rest of the docks should not load again. Oly newly added dock should get impacted.

If I try to add the AsyncPostBackTrigger to Node click then I get the following error.

A control with ID 'RadTreeViewCustSupportReports' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: A control with ID 'RadTreeViewCustSupportReports' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.


Treeview inside the combobox:
<telerik:RadComboBox ID="RadComboReports" runat="server" AllowCustomText="true" EmptyMessage="-- Select Report --"
                           Height="300px" ShowToggleImage="True" Skin="Default" Width="275px">
                           <ItemTemplate>
                               <div id="div1">
                                   <telerik:RadTreeView ID="RadTreeViewCustSupportReports" runat="server" OnNodeClick="RadTreeViewCustSupportReports_NodeClick"
                                       Skin="Vista" Width="100%">
                                       <Nodes>
                                           <telerik:RadTreeNode runat="server" ImageUrl="~/Images/chart_pie.png" Text="Avg Response Time"
                                               Value="~/Internal/Dashboard/Reports/CSMD_Average_Response_Time.ascx">
                                           </telerik:RadTreeNode>
                                           <telerik:RadTreeNode runat="server" ImageUrl="~/Images/chart_pie.png" Text="Avg Resolution Time Frontline"
                                               Value="~/Internal/Dashboard/Reports/CSMD_Average_Resolution_Time_FL.ascx">

Update panel where raddoclayout is placed:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
    <ContentTemplate>
        <Martinbeeby:RadDockLayoutNew ID="RadDockLayout1" runat="server" OnLoadDockLayout="RadDockLayout1_LoadDockLayout"
            OnSaveDockLayout="RadDockLayout1_SaveDockLayout">
            <table style="width: 100%; padding-top: 4px;" cellpadding="0" cellspacing="0" border="0">
                <tr align="left" style="padding-bottom: 0px; padding-top: 0px; padding-left: 0px;
                    padding-right: 0px;">
                    <td style="vertical-align: top; width: 267px; padding-left: 0px; padding-right: 0px;">
                        <Martinbeeby:RadDockZoneNew ID="RadDockZone1" runat="server" MinHeight="500px" Width="267px"
                            BorderStyle="None">

AsyncPostBackTrigger:

</Martinbeeby:RadDockLayoutNew>
            </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="RadTreeViewCustSupportReports" EventName="NodeClick" />
            </Triggers>
        </asp:UpdatePanel>


How to add this trigger ?

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 11 May 2011, 11:16 AM
Hi Prayag,

This error occurs because the RadComboBox is a naming container and the TreeView's modified. To avoid this problem you need to create the trigger dynamically and provide the UniqueID of the RadTreeView to the its ControlID property.

Best wishes,
Dobromir
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Dock
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or