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

Postback not fired on command and dockpositionchanged

2 Answers 65 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Yann
Top achievements
Rank 1
Yann asked on 19 Feb 2009, 08:19 AM

I've got a big trouble with RadDock which doesn't fire event on custom command and on position changed.

I tried all the solutions described in this forum but non of them worked in my case. So I'm disappointed.

Here is my configuration :

1) I've a master page which declares scriptmanager and AjaxManager. This master page contains a place holder. Here is the aspx code :

<body>  
    <form id="form1" runat="server">  
    <div align=center>  
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager>  
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX=true>  
        </telerik:RadAjaxManager>  
        <telerik:RadAjaxLoadingPanel HorizontalAlign=Right ID="LoadingPanel1" runat=server Width="160px">  
            <asp:Image ID="Image1" runat="server" ImageUrl="~/admin/images/loading5.gif" style="border:0;margin-top:20px;" />  
        </telerik:RadAjaxLoadingPanel>  
        <table cellSpacing="0" cellPadding="0" style="border-collapse: collapse; clear: both; width: 100%; border: solid 1px #98b7de;">  
            <tr height=5%>  
                <td colspan=1 width="100%" align="left">  
                    <uc1:wucMenuAdmin ID="wucMenuAdmin1" runat="server" />  
                </td>  
            </tr>  
            <tr height=5%>  
                <td colspan=1 width="100%" align=center>  
                    <asp:Panel ID="panelTitre" runat=server>  
                        <table cellSpacing="0" cellPadding="0" width=100%>  
                            <tr height="50px">  
                                <td width="80%" class="formHeader" align="left" style="padding-left:10px;padding-top:10px;"   
                                    height="50px">  
                                    <asp:Label ID="lblTitrePage" runat=server></asp:Label>  
                                </td>  
                                <td width=20class="formHeader" align="right" valign=top>  
                                    <asp:Panel ID="PanelLoading" runat=server></asp:Panel>  
                                </td>  
                            </tr>  
                        </table>  
                    </asp:Panel>  
                </td>  
            </tr>  
            <tr height=80%>  
                <td colspan=1 width="100%" valign=top align="left" style="height: 730px">  
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
                    </asp:ContentPlaceHolder>  
                </td>  
            </tr>  
            <tr height=5%>  
                <td colspan="1" class="petittitre" Align="right" valign="bottom">  
                    © Opsys- <href="http://www.opsys.fr">www.opsys.fr</a>  
                </td>  
            </tr>  
        </table>  
    </div>  
    </form>  
</body> 

2) I've got an aspx page which uses the master page above. In this aspx page, i declared a scriptmanagerproxy, radajaxmanagerproxy, and I've got a RadDockZone. Here is a part of the aspx code :

<%@ Page MasterPageFile="~/admin/Admin.Master" AutoEventWireup="false" CodeBehind="Index.aspx.vb" Inherits="OPAC_LOCAL.IndexAdminContenu" %>  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>  
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"  
    Namespace="System.Web.UI" TagPrefix="asp" %>  
<%@ Register TagPrefix="uc1" TagName="saisieDateLimite" Src="~/admin/contenu/wucSaisieDatelimite.ascx" %>  
 
<asp:Content runat=server ContentPlaceHolderID=HeadContent>  
    <style type="text/css">  
        .EditerDockCommand  
        {  
        width: 15px;  
        background:url(../images/Edit.gif) no-repeat;  
        }  
        .SupprimerDockCommand  
        {  
        width: 15px;  
        background:url(../images/remove-16x16.png) no-repeat;  
        cursor:hand;  
        }  
        .DockRadPane  
        {  
            position:relative;  
        }  
        .RadNode  
        {  
            cursor:hand;  
        }  
    </style>  
</asp:Content>  
<asp:Content runat=server ContentPlaceHolderID=ContentPlaceHolder1>  
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">  
    </asp:ScriptManagerProxy>  
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat=server>  
        <script language=javascript type="text/javascript">  
            function SplitterClientLoaded(sender, args) {  
                sender.get_element().style.visibility = 'inherit';  
            }  
 
            function AfficherMenuContenu(sender, args) {  
                var treeNode = args.get_node();  
                setMenuItemsState(args.get_menu().get_items(), treeNode);  
            }  
 
            function RefreshParagraphes() {  
                var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");  
                ajaxManager.ajaxRequest("RefreshParagraphes");  
            }  
              
            function setMenuItemsState(menuItems, treeNode) {  
 
                for (var i = 0; i < menuItems.get_count(); i++) {  
                    var menuItem = menuItems.getItem(i);  
                    switch (menuItem.get_value()) {  
                        case "SupprimerPage":  
                            if (treeNode.get_category() == "page") {  
                                menuItem.set_visible(true);  
                                menuItem.set_text(String.format('Supprimer {0}', treeNode.get_text().replace(/\s*\([\d]+\)\s*/ig, "")));  
                            } else {  
                                menuItem.set_visible(false);  
                            }  
                            break;  
                        case "SupprimerRubrique":  
                            if (treeNode.get_category() == "rubrique") {  
                                menuItem.set_visible(true);  
                                menuItem.set_text(String.format('Supprimer {0}', treeNode.get_text().replace(/\s*\([\d]+\)\s*/ig, "")));  
                            } else {  
                                menuItem.set_visible(false);  
                            }  
                            break;  
                        case "AjouterPage":  
                            if (treeNode.get_category() == "rubrique") {  
                                menuItem.set_visible(true);  
                            } else {  
                                menuItem.set_visible(false);  
                            }  
                            break;  
                        case "AjouterRubrique":  
                            if (treeNode.get_category() == "rubrique") {  
                                menuItem.set_visible(true);  
                            } else {  
                                menuItem.set_visible(false);  
                            }  
                            break;  
                    }  
                }  
            }  
 
            function editerParagrapheCommand(dockableObject, command) {  
                window.radopen("EditParagraphe.aspx?ID=" + command.Command.get_name(), "EditionParagraphe");  
                return false;  
            }  
 
            function supprimerParagrapheCommand(dockableObject, command) {  
                args.set_cancel(!confirm("ConfirmSuppressionParagraphe.aspx?ID=" + command.Command.get_name(), "SuppressionParagraphe"));  
            }  
 
            function ContenuContextMenuClientItemClicking(sender, args) {  
                if (args.get_menuItem().get_value() == "SupprimerPage") {  
                    if (!confirm('Confirmez-vous la suppression de cette page ?')) {  
                        args.get_menuItem().get_menu().hide();  
                        args.set_cancel(true);  
                    }  
                }  
                else if (args.get_menuItem().get_value() == "SupprimerRubrique") {  
                    if (!confirm('Confirmez-vous la suppression de cette rubrique ?')) {  
                        args.get_menuItem().get_menu().hide();  
                        args.set_cancel(true);  
                    }  
                }  
            }  
 
            function RadToolbarPanneauGaucheClientButtonClicking(sender, args) {  
                var button = args.get_item();  
                if (button.get_commandName() == "Supprimer") {  
                    args.set_cancel(!confirm('Confirmez-vous la suppression des éléments sélectionnés ?'));  
                }  
            }  
 
            function ArbreContenuClientNodeChecked(sender, args) {  
                var treeView = $find("<%= ArbreContenu.ClientID %>");  
                var checkedNodes = treeView.get_checkedNodes();  
                var toolBar = $find("<%= RadToolbarPanneauGauche.ClientID %>");  
                var btnAjouterRubrique = toolBar.findItemByValue("AjouterRubrique");  
                var btnAjouterPage = toolBar.findItemByValue("AjouterPage");  
                var btnSupprimer = toolBar.findItemByValue("Supprimer");  
                btnAjouterPage.set_enabled((checkedNodes.length <= 1) && (args.get_node().get_category() == "rubrique"));  
                btnAjouterRubrique.set_enabled((checkedNodes.length <= 1) && (args.get_node().get_category() == "rubrique"));  
                btnSupprimer.set_enabled(checkedNodes.length > 0);  
            }  
        </script>  
    </telerik:RadScriptBlock>  
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat=server>  
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadDockZoneParagraphes" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="btnEnregistrerNom">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="ArbreContenu" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauGauche" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauDroite" />  
                    <telerik:AjaxUpdatedControl ControlID="RadDockZoneParagraphes" />  
                    <telerik:AjaxUpdatedControl ControlID="lblMessage" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="btnEditerNom">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="btnAnnulerNom">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="ArbreContenu">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="ArbreContenu" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauGauche" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauDroite" />  
                    <telerik:AjaxUpdatedControl ControlID="RadDockZoneParagraphes" />  
                    <telerik:AjaxUpdatedControl ControlID="lblMessage" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID=RadToolbarPanneauGauche>  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="ArbreContenu" />  
                    <telerik:AjaxUpdatedControl ControlID="RadDockZoneParagraphes" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauGauche" />  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauDroite" />  
                    <telerik:AjaxUpdatedControl ControlID="lblMessage" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="RadToolbarPanneauDroite">  
                <UpdatedControls>  
                    <telerik:AjaxUpdatedControl ControlID="RadToolbarPanneauDroite" />  
                    <telerik:AjaxUpdatedControl ControlID="RadDockZoneParagraphes" />  
                    <telerik:AjaxUpdatedControl ControlID="lblMessage" />  
                    <telerik:AjaxUpdatedControl ControlID="lblPublication" />  
                    <telerik:AjaxUpdatedControl ControlID="SaisieDateLimite1" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEnregistrerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="lblNom" />  
                    <telerik:AjaxUpdatedControl ControlID="txtNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnEditerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="btnAnnulerNom" />  
                    <telerik:AjaxUpdatedControl ControlID="PanelLoading" LoadingPanelID="LoadingPanel1" />  
                </UpdatedControls>  
            </telerik:AjaxSetting>  
           </AjaxSettings>  
        </telerik:RadAjaxManagerProxy>  
    <asp:Panel ID="Panel1" runat=server Width=100Height=100%>  
        <div align=center>  
            <telerik:RadSplitter ID="RadSplitterBrowser"  VisibleDuringInit=false OnClientLoaded="SplitterClientLoaded" runat="server" Orientation=Vertical Skin="Office2007" height=100Width=100BorderSize=1 BorderStyle=Solid ResizeMode=Proportional ResizeWithBrowserWindow=true ResizeWithParentPane=true>  
                <telerik:RadPane runat=server ID="RadPaneNavigation" Width=25%>  
                    <table width=100%>  
                        <tr height="20px">  
                            <td class="bloctitreadmin" width=100align=left>  
                                Contenu du POD  
                            </td>  
                        </tr>  
                        <tr>  
                            <td class="blocpageadmin" width=100align=left>  
                                <telerik:RadToolBar ID="RadToolbarPanneauGauche" runat="server" width=100SkinID="Telerik" OnButtonClick="RadToolbarPanneauGauche_ButtonClick" OnClientButtonClicking="RadToolbarPanneauGaucheClientButtonClicking">  
                                    <Items>  
                                        <telerik:RadToolBarButton runat="server" Text="" CommandName="AjouterRubrique" CommandArgument="AjouterRubrique"   
                                            ImageUrl="~/admin/images/folder-full-add-24x24.png"   
                                            ToolTip="Ajouter une rubrique" Value="AjouterRubrique">  
                                        </telerik:RadToolBarButton>  
                                        <telerik:RadToolBarButton runat="server" Text="" CommandName="AjouterPage" CommandArgument="AjouterPage"  
                                            ImageUrl="~/admin/images/page-add-24x24.png" ToolTip="Ajouter une page"   
                                            Value="AjouterPage">  
                                        </telerik:RadToolBarButton>  
                                        <telerik:RadToolBarButton runat="server" Text="" CommandName="Supprimer" CommandArgument="Supprimer"  
                                            ImageUrl="~/admin/images/page-remove-24x24.png"   
                                            ToolTip="Supprimer la sélection" Value="Supprimer">  
                                        </telerik:RadToolBarButton>  
                                    </Items>  
                                </telerik:RadToolBar>  
                            </td>  
                        </tr>  
                        <tr>  
                            <td class="blocpageadminbas" width=100%>  
                                <telerik:RadTreeView ID="ArbreContenu" runat="server" width=100%  
                                    EnableViewState=true   
                                    CheckBoxes="True" CheckChildNodes="False" EnableDragAndDrop="True"   
                                    EnableDragAndDropBetweenNodes="True" CssClass="RadNode"  
                                    Skin="Telerik" SkinID="Telerik"  
                                    OnClientContextMenuShowing="AfficherMenuContenu"  
                                    OnClientNodeChecked="ArbreContenuClientNodeChecked"  
                                    OnNodeClick="ArbreContenu_NodeClick"  
                                    OnContextMenuItemClick="ArbreContenu_ContextMenuItemClick"  
                                    OnNodeDrop="ArbreContenu_NodeDrop"  
                                    OnClientContextMenuItemClicking="ContenuContextMenuClientItemClicking">  
                                        <ContextMenus>  
                                            <telerik:RadTreeViewContextMenu ID="ContenuContextMenu" runat=server Skin="Telerik">  
                                                <Items>  
                                                    <telerik:RadMenuItem runat=server ImageUrl="~/admin/images/folder-full-add-24x24.png" Text="Ajouter une rubrique" Value="AjouterRubrique"></telerik:RadMenuItem>  
                                                    <telerik:RadMenuItem runat=server ImageUrl="~/admin/images/page-add-24x24.png" Text="Ajouter une page" Value="AjouterPage"></telerik:RadMenuItem>  
                                                    <telerik:RadMenuItem runat=server ImageUrl="~/admin/images/folder-remove-24x24.png" Text="Supprimer" Value="SupprimerRubrique"></telerik:RadMenuItem>  
                                                    <telerik:RadMenuItem runat=server ImageUrl="~/admin/images/page-remove-24x24.png" Text="Supprimer" Value="SupprimerPage"></telerik:RadMenuItem>  
                                               </Items>  
                                            </telerik:RadTreeViewContextMenu>  
                                        </ContextMenus>  
                                </telerik:RadTreeView>  
                            </td>  
                        </tr>  
                    </table>  
                </telerik:RadPane>  
                <telerik:RadSplitBar ID="RadSplitBar1" runat=server CollapseMode=Both />  
                <telerik:RadPane runat=server ID="RadPaneDetail" Width="75%" CssClass="DockRadPane">  
                    <table style="width: 100%;">  
                        <tr>  
                            <td colspan=2 class="bloctitreadmin" align=left width=100%>  
                                <table width=100%>  
                                    <tr>  
                                        <td><asp:Label ID="lblNom" CssClass="lbltitreadmin" runat="server"></asp:Label></td>  
                                        <td><asp:Label ID="lblPublication" runat=server CssClass="lbltitreadmin"></asp:Label></td>  
                                        <td><asp:ImageButton ID="btnEditerNom" style="cursor:hand;" runat="server" ToolTip="Modifier le nom de la sitothèque" ImageUrl="~/admin/images/Edit.gif" /></td>  
                                        <td><asp:TextBox ID="txtNom" runat="server" Columns=30 MaxLength=50></asp:TextBox></td>  
                                        <td>  
                                            <asp:RequiredFieldValidator ID="txtNomValidator" runat="server"   
                                                        ControlToValidate="txtNom" Display="Dynamic" EnableClientScript="true"   
                                                        ErrorMessage="Veuillez entrer un nom" SetFocusOnError="true">  
                                            </asp:RequiredFieldValidator>  
                                        </td>  
                                        <td><uc1:saisieDateLimite ID="SaisieDateLimite1" runat="server" /></td>  
                                        <td><asp:ImageButton ID="btnEnregistrerNom" style="cursor:hand;" ToolTip="Enregistrer le nom" ImageUrl="~/admin/images/Update.gif" runat="server" /></td>  
                                        <td><asp:ImageButton ID="btnAnnulerNom" style="cursor:hand;width:16px;height:16px" ToolTip="Annuler la modification" ImageUrl="~/admin/images/stop.png" runat="server" /></td>  
                                    </tr>  
                                </table>  
                            </td>  
                        </tr>  
                        <tr>  
                            <td colspan=1 class="blocpageadmin" width=30align=left>  
                            <telerik:RadToolBar ID="RadToolbarPanneauDroite" runat="server" OnButtonClick="RadToolbarPanneauDroite_ButtonClick" SkinID="Telerik" width="100%">  
                                <Items>  
                                    <telerik:RadToolBarButton Commandname="AjouterParagraphe" CommandArgument="AjouterParagraphe" ImageUrl="~/admin/images/blog-post-add-24x24.png" Text="" Tooltip="Ajouter un paragraphe" Value="AjouterParagraphe">  
                                    </telerik:RadToolBarButton>  
                                </Items>  
                            </telerik:RadToolBar>  
                            </td>  
                            <td colspan=1 class="blocpageadmin" align=right width=70%>  
                                <asp:Label ID="lblMessage" runat=server></asp:Label>  
                            </td>  
                        </tr>  
                        <tr>  
                            <td align="left" class="blocpageadminbas" colspan="2" width="100%">  
                                <telerik:RadDockLayout runat=server ID="RadLayout">  
                                    <telerik:RadDockZone ID="RadDockZoneParagraphes" Runat="server"   
                                        EnableEmbeddedSkins="false" Height="650px"   
                                        Orientation="Vertical" Width="97%">  
                                    </telerik:RadDockZone>  
                                </telerik:RadDockLayout>  
                            </td>  
                        </tr>  
                    </table>  
                </telerik:RadPane>  
            </telerik:RadSplitter>  
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
                <Windows>  
                    <telerik:RadWindow ID="EditionParagraphe" OnClientClose="RefreshParagraphes" Title="Edition d'un paragraphe" Behaviors=Move,Resize Height="800px" Skin="Telerik" Width="1024px" Left="200px" ReloadOnShow=false Modal=true runat="server" ShowContentDuringLoad=false>  
                    </telerik:RadWindow>  
                    <telerik:RadWindow ID="SuppressionParagraphe" OnClientClose="RefreshParagraphes" Title="Suppression d'un paragraphe" Behaviors=Move,Resize Height="200px" Skin="Telerik" Width="700px" Left="200px" ReloadOnShow=false Modal=true runat="server" ShowContentDuringLoad=false>  
                    </telerik:RadWindow>  
                </Windows>  
            </telerik:RadWindowManager>  
        </div>  
    </asp:Panel>  
</asp:Content>  
 

In the RadDockZone (RadDockZoneParagraphes), the RadDock objects are created dynamically from database request. Each RadDock object contains a custom command ("SupprimerCommand") which throws the client event "SupprimerDockCommand".

I've declared in the RadDock object a handler for Command event. Below is th code :

    Private Function CreerParagraphe(ByVal pParagraphe As PODContenuParagraphe, ByVal pIdPage As IntegerAs RadDock  
        Dim rdo As RadDock = New RadDock()  
        rdo.ID = "RadObjet" & pParagraphe.IdParagraphe.ToString()  
        rdo.DockMode = DockMode.Docked  
        rdo.Resizable = True  
        rdo.Skin = "Telerik"  
        rdo.Width = Unit.Percentage(95)  
        rdo.Attributes.Add("ID", pParagraphe.IdParagraphe.ToString())  
        rdo.ExpandText = "Agrandir"  
        rdo.CollapseText = "Réduire"  
        rdo.Title = pParagraphe.CreerTitreParagraphe()  
        rdo.AutoPostBack = True  
        rdo.EnableDrag = True  
 
        AddHandler rdo.Command, dock_Command()  
 
        rdo.ContentContainer.Controls.Add(New LiteralControl(pParagraphe.CreerContenuParagraphe(Request.ApplicationPath)))  
 
        Dim cmdEditerParagraphe As DockCommand = New DockCommand()  
        cmdEditerParagraphe.Text = "Editer"  
        cmdEditerParagraphe.Name = pIdPage.ToString() & "|" & pParagraphe.IdParagraphe.ToString()  
        cmdEditerParagraphe.OnClientCommand = "editerParagrapheCommand"  
        cmdEditerParagraphe.CssClass = "EditerDockCommand"  
        rdo.Commands.Add(cmdEditerParagraphe)  
 
        Dim cmdSupprimerParagraphe As DockCommand = New DockCommand()  
        cmdSupprimerParagraphe.Text = "Supprimer"  
        cmdSupprimerParagraphe.AutoPostBack = True  
        cmdSupprimerParagraphe.Name = pParagraphe.IdParagraphe.ToString()  
        cmdSupprimerParagraphe.OnClientCommand = "supprimerParagrapheCommand"  
        cmdSupprimerParagraphe.CssClass = "SupprimerDockCommand"  
        rdo.Commands.Add(cmdSupprimerParagraphe)  
 
        rdo.Commands.Add(New DockExpandCollapseCommand())  
 
        Return rdo  
    End Function  
 
    Sub dock_Command(ByVal sender As ObjectByVal e As DockCommandEventArgs)  
        'Code ...  
    End Sub 

The problem is that the dock_Command event is never fired. More, the raddockzone disappears. I've tried to add an UpdatePanel with triggers. I've tried to pass by the AjaxManager and call ajaxRequest method. None of these solutions worked.

I've tried to implement dockpositionchange event, but it's the same problem.

So, I need your help.

Thanks

Yann

2 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 23 Feb 2009, 02:39 PM
On first sight everything seems to be OK with your code.
Keep in mind that once you create dynamically RadDocks you should recreate them in OnInit on every postback(ajax call).
I hope this helps.
0
Yann
Top achievements
Rank 1
answered on 25 Feb 2009, 10:16 AM

Hello,

thanks a lot for your answer, I've created my raddock objects in OnInit function and command event is well postback.

I'll try dockPositionchanged event.

Thanks again for your help.

Yann

Tags
Dock
Asked by
Yann
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Yann
Top achievements
Rank 1
Share this question
or