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

Could not find an event named...anything

2 Answers 205 Views
Dock
This is a migrated thread and some comments may be shown as answers.
-DJ-
Top achievements
Rank 1
-DJ- asked on 23 Jun 2008, 05:08 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Petio Petkov
Telerik team
answered on 26 Jun 2008, 01:06 PM
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
0
-DJ-
Top achievements
Rank 1
answered on 27 Jun 2008, 01:57 PM
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-
Tags
Dock
Asked by
-DJ-
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
-DJ-
Top achievements
Rank 1
Share this question
or