Could not find an event named...anything

3 posts, 1 answers
  1. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 23 Jun 2008 Link to this post

    Hi guys,

    I'm trying to achieve something like this: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/AutoPostBack/DefaultCS.aspx

    I read on this forum it's not smart to use the RadAjaxManager, so I'm basically following the online demo exactly. I just want to ajaxify all the dockcommands.

    I have an asp updatepanel in the page where the docks are:
    <asp:updatepanel runat="server" id="UpdatePanel1"
        <contenttemplate> 
            <asp:label runat="server" id="Label1" enableviewstate="false" style="color: green; display: block;" /> 
        </contenttemplate> 
        <triggers> 
            <asp:asyncpostbacktrigger controlid="dockArticles" eventname="WhatShallIPutHere?" /> 
        </triggers> 
    </asp:updatepanel> 

    Then there is the dock:

                 <telerik:raddock OnCommand="RadDock_Command" runat="server" id="dockArticles" title="Greinar & pistlar" width="250px" AutoPostBack="True" style="margin-bottom: 10px;"
                    <Commands> 
                        <telerik:dockclosecommand AutoPostBack="true" Text="Loka" /> 
                        <telerik:dockexpandcollapsecommand AutoPostBack="true" Text="Minnka" /> 
                        <telerik:dockpinunpincommand AutoPostBack="true" Text="Festa" /> 
                        <telerik:dockcommand autopostback="true" name="MoreArticles" Text="Fjölga greinum" CssClass="comAddItems" /> 
                        <telerik:dockcommand autopostback="true" name="LessArticles" Text="Fækka greinum" CssClass="comRemoveItems" />                     
                    </Commands>                                 
                    <contenttemplate> 
                        <D10:Articles ID="D10Articles" Runat="Server" /> 
                    </contenttemplate> 
                </telerik:raddock> 


    The problem is that I always get the error:  Could not find an event named 'LessArticles' on associated control 'dockArticles' for the trigger in UpdatePanel 'UpdatePanel1'.


    where  'LessArticles' can be substituted with anything. As you can see, LessArticles is the name of one of my two custom commands. Or so I thought...


    Regards,
    -DJ-
  2. Answer
    Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 26 Jun 2008 Link to this post

    Hello -DJ-,

    You should set eventname="Command"  e.g.
    <asp:asyncpostbacktrigger controlid="dockArticles" eventname="Command" />
     and everything should be OK.



    Greetings,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. -DJ-
    -DJ- avatar
    263 posts
    Member since:
    Oct 2004

    Posted 27 Jun 2008 Link to this post

    Hi Petio,

    that works perfectly.

    I also found out that since I want to ajaxify all the dockcommands, I can actually just skip declaring the eventname, seems to work well without it.

    Regards,
    -DJ-
Back to Top