need to add AsyncPostBackTrigger

2 posts, 0 answers
  1. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 06 May 2011 Link to this post

    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 ?

  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 11 May 2011 Link to this post

    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.

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