PostBack on AjaxUpdate after paging grid

5 posts, 1 answers
  1. Stephane
    Stephane avatar
    27 posts
    Member since:
    Mar 2009

    Posted 05 Aug 2010 Link to this post

    Hi i have a problem with the RadToolTipManager.

    When my page in loading for the fist time, the toolTip is ok.
    But when I change the page on my grid, a postback is sended and all the page refreshed.

    look's my code:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
     
    <%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
    <%@ Register TagPrefix="Local" TagName="CustomImage" Src="~/CustomImage.ascx" %>
    <%@ Register Src="~/DocumentDetails.ascx" TagName="DocumentDetails" TagPrefix="dd1" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title>VIS-On Nissim de Cammondo</title>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
        <style type="text/css">
            html, body, form
            {
                margin: 0;
                padding: 0;
                height: 100%;
                width: 100%;
                font-family: Arial, Helvetica, Verdana;
            }
            #krpanoDIV
            {
                height: 100%;
                width: 100%; /*margin-left: 250px;*/
                z-index: -100;
            }
            #Documentation
            {
                width: 224px;
                height: 100%; /*float: left;*/
            }
            #Select1
            {
                width: 100%;
            }
            #Select2
            {
                width: 100%;
            }
            .LinkToPOcss:hover
            {
                cursor: pointer;
                text-decoration: underline;
            }
        </style>
    </head>
    <body>
        <form id="MainForm" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">
            <Scripts>
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                <asp:ScriptReference Path="~/Scripts/swfkrpano.js" />
            </Scripts>
            <Services>
                <asp:ServiceReference Path="~/BuilderService.asmx" />
            </Services>
        </telerik:RadScriptManager>
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" PersistenceKey="SkinVison"
            PersistenceMode="Session" ShowChooser="false" Skin="Forest">
        </telerik:RadSkinManager>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" DestroyOnClose="true"
            KeepInScreenBounds="true" ShowContentDuringLoad="false" VisibleStatusbar="false"
            VisibleOnPageLoad="false" ReloadOnShow="true">
        </telerik:RadWindowManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnResponseEnd="AjaxPanelCategorieFilterResponseEnd"
            OnAjaxRequest="AjaxPanelRecherche_AjaxRequest" RestoreOriginalRenderDelegate="false">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                            <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RechecheTextBox">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                            <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RechecheTextBoxClear">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                            <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="LeaveTargetAndToolTip"
            Width="250" Height="350" runat="server" EnableShadow="true" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" RelativeTo="Element"
            Position="MiddleRight" MouseTrailing="false" AutoTooltipify = "false">
        </telerik:RadToolTipManager>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
     
            <script type="text/javascript">
                var swf = null;
                var Loaded = false;
                function pageLoad() {
                    if (Loaded == false) {
                        Loaded = true;
                        if (swf == null) {
                            swf = createswf("swf/krpano.swf", "krpanoSWFObject", "80%", "100%", "9.0.28", "#000000");
                            swf.addVariable("xml", "BuilderXmlKrpano.aspx");
                            swf.addVariable("license", "swf/krpano.license");
                            swf.addParam("wmode", "transparent");
                            swf.embed("krpanoDIV");
                        }
                        POComboBox_SelectedIndexChanged(null, null);
     
                    }
                }
                function krpano() {
                    return document.getElementById("krpanoSWFObject");
                }
                function RenduPanel_Resized(sender, args) {
                    var availableWidth = $telerik.$('#<%=RenduPanel.ClientID %>').width();
                    $telerik.$('#<%=CommentairePO.ClientID %>').width(availableWidth * 0.8);
                }
     
                function MainConteneur_ClientLoad(sender, args) {
                    sender.set_height($telerik.$(window).height());
                    var availableWidth = $telerik.$('#<%=RenduPanel.ClientID %>').width();
                    var availableHeight = $telerik.$('#<%=RenduPanel.ClientID %>').height() - $telerik.$('#<%=LOGO.ClientID %>').height() - $telerik.$('#<%=LibellePO.ClientID %>').height() - $telerik.$('#<%=CommentairePO.ClientID %>').height() - 20;
                    $telerik.$('#<%=krpanoDIVContener.ClientID %>').height(availableHeight);
                    $telerik.$('#<%=CommentairePO.ClientID %>').width(availableWidth * 0.8);
                    var diffHeiht = availableHeight * 0.8;
                    var offSet = (availableHeight - diffHeiht) / 2;
                    //$telerik.$('#<%=krpanoDIVContener.ClientID %>').css("margin-top", offSet + "px");
                }
                function MainConteneur_ClientResized(sender, args) {
     
                    MainConteneur_ClientLoad(sender, args);
     
                }
                function CategorieFilterComboBox_SelectedIndexChanged(sender, args) {
                    var ajaxManager = $find("<%= AjaxPanelCategorieFilter.ClientID %>");
                    ajaxManager.ajaxRequest("PanelObjet");
                }
                function POComboBox_SelectedIndexChanged(sender, args) {
                    var ajaxManager = $find("<%= AjaxPanelCategorieFilter.ClientID %>");
                    ajaxManager.ajaxRequest("ALL");
                    if (args != null) {
                        var po = args.get_item();
                        var cb = $find("<%=ThemeVisiteComboBox.ClientID %>").get_selectedItem();
                        //krpano().call("loadpano(BuilderService.asmx/BuildXMLKrpano?reference=" + po.get_value() + "&idThemeVisite=" + cb.get_value() + " ,null,MERGE,BLEND(1));");
                        //BuilderService.BuildXMLKrpano(po.get_value(), cb.get_value());
                        var reference = po.get_value();
                        krpano().call("loadpano(BuilderXmlKrpano.aspx?reference=" + reference + "&theme=" + cb.get_value() + " ,null,MERGE,BLEND(1));");
     
                    }
                    BuilderService.GetLibellePO(reference, LibelleOnSucceeded);
                    BuilderService.GetCommentairePO(reference, CommentaireOnSucceeded);
                }
                function ObjetSearchTextBox_ButtonClick(sender, args) {
                    var ajaxManager = $find("<%= AjaxPanelCategorieFilter.ClientID %>");
                    ajaxManager.ajaxRequest("PanelObjet");
                }
     
                function ChangePOOnSucceeded(result) {
                    krpano().call("loadxml(" + result + " ,null,MERGE,BLEND(1));");
                }
                function ObjetOnClick(idObjet) {
     
                    var dd = $find("<%=ThemeVisiteComboBox.ClientID %>").get_selectedItem();
                    var cb = $find("<%=POComboBox.ClientID %>").get_selectedItem();
                    var idThemeVisite = dd.get_value();
                    var reference = cb.get_value();
                    BuilderService.ShowPictoByObjet(idObjet, reference, idThemeVisite, OnSucceeded);
                }
                // This is the callback function that
                // processes the Web Service return value.
                function OnSucceeded(result) {
                    //alert("ok " + result);
                    krpano().call(result);
                }
                //Begin Advanced Search Actions
                function ASObjetOnClick(idObjet, reference) {
                    ChangeIndexOfCb(reference);
                    ObjetOnClick(idObjet);
                }
                function ASDocumentOnClick(idDoc) {
     
                }
                function ASPictogrammeOnClick(idPicto) {
     
                }
                function ASPointObservationOnClick(reference) {
                    ChangeIndexOfCb(reference);
                }
                //End Advanced Search Actions
     
                function ChangeIndexOfCb(reference) {
                    var cb = $find("<%=POComboBox.ClientID %>");
                    var item = cb.findItemByValue(reference);
                    if (item) {
                        item.select();
                    }
                }
                function LibelleOnSucceeded(result) {
                    var LibellePO = $get("<%=LibellePO.ClientID %>")//document.getElementById("LibellePO");
                    LibellePO.innerHTML = result;
                }
                function CommentaireOnSucceeded(result) {
                    var CommentairePO = $get("<%=CommentairePO.ClientID %>");
                    CommentairePO.value = result;
                }
                function ChangeDisplayMap(idEtage) {
     
                    alert("Fonction non terminer");
                    krpano().call("set(plugin[DisplayMap].pathmap, false);");
                    krpano().call("set(plugin[DisplayMap].points, false);");
                }
     
                var PictoInfoIsClosed = false;
                function ShowPictoInfo(idPictogramme) {
                    PictoInfoIsClosed = false;
                    var browserwidth = $telerik.$(window).width();
                    var browserheight = $telerik.$(window).height();
     
                    var oManager = GetRadWindowManager();
                    var url = "ShowPictogrammeInfo.aspx";
                    url += "?picto=" + idPictogramme;
                    idPictogrammeGlobal = idPictogramme;
                    url += "&wd=" + browserwidth;
                    url += "&hg=" + browserheight;
                    var oWnd = oManager.open(url, "PicoInfo");
                    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
                    oWnd.add_beforeClose(ShowPictoInfoClose);
                    oWnd.set_visibleTitlebar(true);
                    oWnd.maximize();
                }
                function AjaxPanelCategorieFilterResponseEnd(senser, args) {
                    $telerik.$("#<%=RenduPanel.ClientID %>").focus();
                }
                function ShowPictoInfoClose(Owind, evtArgs) {
                    PictoInfoIsClosed = true;
                }
                function resizing(evt) {
                    var oManager = GetRadWindowManager();
                    var browserwidth = $telerik.$(window).width();
                    var browserheight = $telerik.$(window).height();
                    var oWind = oManager.getWindowByName("PicoInfo");
                    if (oWind) {
                        if (!PictoInfoIsClosed) {
                            var url = "ShowPictogrammeInfo.aspx";
                            url += "?picto=" + idPictogrammeGlobal;
                            url += "&wd=" + browserwidth;
                            url += "&hg=" + browserheight;
                            if (oWind.get_navigateUrl() != url) {
                                oWind.remove_beforeClose(ShowPictoInfoClose);
                                oWind.close();
                                oWind = null;
                                oWind = oManager.open(url, "PicoInfo");
                                oWind.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
                                oWind.add_beforeClose(ShowPictoInfoClose);
                                oWind.set_visibleTitlebar(true);
                                oWind.maximize();
                            }
                        }
                    }
                }
                $telerik.$(document).ready(function() {
                    $telerik.$(window).resize(resizing);
                });
     
                function RechercheSearchTextBox_ButtonClick(sender, args) {
                    var ajaxManager = $find("<%=RadAjaxManager1.ClientID %>");
                    if (sender.get_value().length > 0) {
                        ajaxManager.ajaxRequestWithTarget('<%= RechecheTextBox.UniqueID %>', '');
                    }
                    //ajaxManager.ajaxRequest('');
                    return true;
                }
                function RechecheTextBoxKeyPress(sender, args) {
                    if (args.get_keyCode() == 13) {
                        args.get_domEvent().stopPropagation();
                        args.get_domEvent().preventDefault();
                        //ContentMain$RadToolBar1
                        if (sender) {
                            RechercheSearchTextBox_ButtonClick(sender, args);
                            //                        var text = sender.get_textBoxValue();
                            //                        if (text != null && text.length > 0) {
                            //                            RechercheSearchTextBox_ButtonClick(sender, args);   
                            //                        } else {
                            //                            sender.blur();
                            //                        }
                        }
                    }
                }
                function ClearSearch() {
                    var ajaxManager = $find("<%=RadAjaxManager1.ClientID %>");
                    ajaxManager.ajaxRequest("clear");
                }
                function RadGrid1_RowClick(sender, args) {
                    var grid = $find("<%=RadGrid1.ClientID %>");
                    var masterView = grid.get_masterTableView();
                    var index = args.get_itemIndexHierarchical()
                    var idObject = masterView.getCellByColumnUniqueName(masterView.get_dataItems()[index], "idObject").innerHTML;
                    var objectTypeString = masterView.getCellByColumnUniqueName(masterView.get_dataItems()[index], "ObjectType").innerHTML;
                    switch (objectType) {
                        case "Objet":
                            break;
                        case "Pictogramme":
                            break;
                        case "PointObservation":
                            break;
                        case "Document":
                            break;
                        default:
                            break;
     
                    }
                }
                function RadGrid1_RowContextMenu(sender, args) {
                }      
            </script>
     
        </telerik:RadCodeBlock>
        <telerik:RadSplitter ID="MainConteneur" runat="server" Width="100%" Height="100%"
            OnClientLoad="MainConteneur_ClientLoad" OnClientResized="MainConteneur_ClientResized"
            VisibleDuringInit="false">
            <telerik:RadPane ID="GeneralPanel" runat="server" Width="22px" Scrolling="none">
                <telerik:RadSlidingZone ID="GeneralSlidingZone" runat="server" Width="22px">
                    <telerik:RadSlidingPane ID="GeneralSlidingPane" Title="General" runat="server" Width="200px"
                        DockOnOpen="true">
                        <asp:Panel runat="server" ID="Panel1" Width="100%" Style="margin: 0px; padding: 0px;">
                            <br />
                            <asp:Label runat="server" ID="Musee" Text="Musée:"></asp:Label>
                            <br />
                            <asp:ObjectDataSource ID="ODSBatiment" runat="server" SelectMethod="GetAllBatiment"
                                TypeName="DataItemFacade" OldValuesParameterFormatString="original_{0}"></asp:ObjectDataSource>
                            <telerik:RadComboBox ID="BatimentComboBox" runat="server" Width="100%" DataSourceID="ODSBatiment"
                                DataTextField="Libelle" DataValueField="idBatiment" />
                            <br />
                            <br />
                            <asp:Label runat="server" ID="Label2" Text="Thèmes de visite :"></asp:Label><br />
                            <asp:ObjectDataSource ID="ODSThemeVisite" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="GetThemeVisiteForBatiment" TypeName="DataItemFacade">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="BatimentComboBox" Name="idBatiment" PropertyName="SelectedValue"
                                        Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                            <telerik:RadComboBox ID="ThemeVisiteComboBox" runat="server" Width="100%" DataSourceID="ODSThemeVisite"
                                DataTextField="Libelle" DataValueField="idThemeVisite">
                            </telerik:RadComboBox>
                            <br />
                            <br />
                            <asp:Label runat="server" ID="Label3" Text="Points d'observation :"></asp:Label>
                            <br />
                            <asp:ObjectDataSource ID="ODSPO" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="GetPOForBatiment" TypeName="DataItemFacade">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="BatimentComboBox" Name="idBatiment" PropertyName="SelectedValue"
                                        Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                            <telerik:RadComboBox ID="POComboBox" OnClientSelectedIndexChanged="POComboBox_SelectedIndexChanged"
                                runat="server" Width="100%" DataSourceID="ODSPO" DataTextField="Libelle" DataValueField="reference">
                            </telerik:RadComboBox>
                        </asp:Panel>
                    </telerik:RadSlidingPane>
                    <telerik:RadSlidingPane Title="Recherche" Visible="true" runat="server" Width="400px"
                        DockOnOpen="true" Scrolling="None" Height="100%" MinWidth="300" MaxWidth="500">
                        <asp:Panel runat="server" ID="PanelRecherche" Height="100%" ScrollBars="None" Width="100%">
                            <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%"
                                ResizeWithParentPane="false" Orientation="Horizontal" PanesBorderSize="0">
                                <telerik:RadPane ID="RadPane1" runat="server" Height="24px" Scrolling="None">
                                    <telerik:RadTextBox ID="RechecheTextBox" runat="server" TextMode="SingleLine" Width="350px"
                                        EmptyMessage="Recherche ..." ButtonsPosition="Right" ShowButton="true" Height="24px"
                                        OnTextChanged="RechecheTextBox_TextChanged">
                                        <EmptyMessageStyle Font-Italic="true" />
                                        <ClientEvents OnKeyPress="RechecheTextBoxKeyPress" OnButtonClick="RechercheSearchTextBox_ButtonClick" />
                                    </telerik:RadTextBox>
                                    <asp:ImageButton runat="server" ID="RechecheTextBoxClear" ImageUrl="~/img/home_hover.png"
                                        Visible="false" Width="24px" Height="24px" ImageAlign="Middle" OnClick="RechecheTextBoxClear_Click" />
                                </telerik:RadPane>
                                <telerik:RadPane ID="RadPane2" runat="server" Height="100%" Scrolling="None">
                                    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="ODSAdvancedSearch" AllowPaging="True"
                                        AutoGenerateColumns="False" Culture="French (France)" GridLines="None" ShowHeader="False"
                                        Height="100%" Width="100%" Style="outline: none" OnItemDataBound="RadGrid1_ItemDataBound" OnPageIndexChanged="RadGrid1_PageIndexChanged">
                                        <MasterTableView DataSourceID="ODSAdvancedSearch">
                                            <Columns>
                                                <telerik:GridBoundColumn Display="false" UniqueName="idObject" DataType="System.Int64">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn Display="false" UniqueName="ObjectType" DataType="System.Int16">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridImageColumn HeaderButtonType="None" ShowFilterIcon="False" UniqueName="TemplateColumn1"
                                                    ImageAlign="Middle" ImageUrl="img/home_hover.png" ImageWidth="24px" ImageHeight="24px">
                                                    <ItemStyle Width="24px" HorizontalAlign="Left" />
                                                </telerik:GridImageColumn>
                                                <telerik:GridTemplateColumn HeaderButtonType="None" ShowFilterIcon="False" UniqueName="TemplateColumn">
                                                    <ItemTemplate>
                                                        <asp:Label runat="server" ID="LabelLibelle" Text='<%#Eval("Libelle") %>'></asp:Label>
                                                        <asp:Panel runat="server" ID="LinkToDoc" Visible="false">
                                                        </asp:Panel>
                                                        <br />
                                                        <asp:Panel runat="server" ID="PanelListPO" Visible="false" Height="40px" ScrollBars="Auto"
                                                            GroupingText="Liste des Po" Width="100%">
                                                            <asp:Repeater runat="server" ID="RepeaterPO" OnItemDataBound="RepeaterPO_ItemDataBound">
                                                                <ItemTemplate>
                                                                    <asp:Panel runat="server" ID="LinkToPO" CssClass="LinkToPOcss" HorizontalAlign="Justify"
                                                                        ScrollBars="None">
                                                                        <asp:Label runat="server" ID="LibellePO" Text='<%#Eval("Libelle") %>'></asp:Label> <asp:Image
                                                                            ID="Image2" runat="server" ImageAlign="AbsMiddle" ImageUrl="gfx/PO.PNG" Width="16px"
                                                                            Height="16px" />
                                                                    </asp:Panel>
                                                                </ItemTemplate>
                                                                <SeparatorTemplate>
                                                                    <br />
                                                                </SeparatorTemplate>
                                                            </asp:Repeater>
                                                        </asp:Panel>
                                                    </ItemTemplate>
                                                    <ItemStyle HorizontalAlign="Left" Wrap="false" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn HeaderButtonType="None" ShowFilterIcon="False" UniqueName="IdItem">
                                                    <ItemTemplate>
                                                        <asp:Label runat="server" ID="LabelIdItem" Text="IdPico"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle Width="50px" HorizontalAlign="Left" Wrap="false" />
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                        </MasterTableView>
                                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="false" ShowPagerText="true" />
                                        <ClientSettings EnableRowHoverStyle="true">
                                            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                            <ClientEvents OnRowDblClick="RadGrid1_RowClick" OnRowContextMenu="RadGrid1_RowContextMenu" />
                                            <Selecting AllowRowSelect="true" />
                                        </ClientSettings>
                                    </telerik:RadGrid>
                                    <asp:ObjectDataSource ID="ODSAdvancedSearch" runat="server" OldValuesParameterFormatString="original_{0}"
                                        SelectMethod="GetAdvancedSearch" TypeName="DataItemFacade">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="RechecheTextBox" Name="textSearch" Type="String" />
                                            <asp:Parameter DefaultValue="true" Name="includePO" Type="Boolean" />
                                            <asp:Parameter DefaultValue="true" Name="includePicto" Type="Boolean" />
                                            <asp:Parameter DefaultValue="true" Name="includeObjet" Type="Boolean" />
                                            <asp:Parameter DefaultValue="true" Name="includeDocument" Type="Boolean" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                </telerik:RadPane>
                            </telerik:RadSplitter>
                        </asp:Panel>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="Radsplitbar1" runat="server">
            </telerik:RadSplitBar>
            <telerik:RadPane ID="RenduPanel" runat="server" Scrolling="None" OnClientResized="RenduPanel_Resized">
                <asp:Table ID="TableRendu" runat="server" Width="100%" CellSpacing="0" CellPadding="0">
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:Image ID="LOGO" runat="server" ImageUrl="~/Data/NissimDeCamondo/logo.gif" Height="55"
                                Width="178" />
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell>
                            <center>
                                <asp:Label runat="server" Style="text-align: right;" Width="80%" ID="LibellePO"></asp:Label>
                            </center>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:Panel runat="server" ID="krpanoDIVContener" HorizontalAlign="Center" Width="100%">
                                <div id="krpanoDIV">
                                    <noscript>
                                        <center>
                                            ERROR:<br />
                                            <br />
                                            Javascript not activated<br />
                                            <br />
                                        </center>
                                    </noscript>
                                </div>
                            </asp:Panel>
                        </asp:TableCell>
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell>
                            <center>
                                <asp:TextBox runat="server" ID="CommentairePO" Height="100px" ReadOnly="True"></asp:TextBox>
                            </center>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </telerik:RadPane>
            <telerik:RadSplitBar ID="Radsplitbar2" runat="server">
            </telerik:RadSplitBar>
            <telerik:RadPane ID="DocumentationPanel" runat="server" Width="22px" Scrolling="none">
                <telerik:RadSlidingZone ID="DocumentationSlidingZone" runat="server" Width="22px"
                    SlideDirection="Left">
                    <telerik:RadSlidingPane ID="ObjetSlidingPane" Title="Objet" runat="server" Width="270px"
                        DockOnOpen="true">
                        <asp:Panel runat="server" ID="PanelObject">
                            <telerik:RadAjaxPanel ID="AjaxPanelCategorieFilter" OnAjaxRequest="AjaxPanelCategorieFilter_AjaxRequest"
                                LoadingPanelID="RadAjaxLoadingPanel1" runat="server" EnablePageHeadUpdate="false"
                                EnableHistory="false" ClientEvents-OnResponseEnd="AjaxPanelCategorieFilterResponseEnd">
                                <telerik:RadTextBox ID="ObjetSearchTextBox" runat="server" Width="100%" TextMode="SingleLine"
                                    EmptyMessage="Recherche d'objets ..." ButtonsPosition="Right" ShowButton="true"
                                    ShouldResetWidthInPixels="true" ClientEvents-OnButtonClick="ObjetSearchTextBox_ButtonClick">
                                    <EmptyMessageStyle Font-Italic="true" />
                                </telerik:RadTextBox>
                                <asp:ObjectDataSource ID="ODSCategorie" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="GetCategorieForPOByThemeVisite" TypeName="DataItemFacade">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="POComboBox" Name="reference" PropertyName="SelectedValue"
                                            Type="String" />
                                        <asp:ControlParameter ControlID="ThemeVisiteComboBox" Name="idThemeVisite" PropertyName="SelectedValue"
                                            Type="Int32" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                                <telerik:RadComboBox ID="CategorieFilterComboBox" runat="server" Width="100%" EmptyMessage="Tous les objets"
                                    DataSourceID="ODSCategorie" DataTextField="Libelle" OnClientSelectedIndexChanged="CategorieFilterComboBox_SelectedIndexChanged"
                                    DataValueField="code">
                                </telerik:RadComboBox>
                                <asp:ObjectDataSource ID="ODSObjet" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="GetObjetForPOByThemeVisite" TypeName="DataItemFacade">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="POComboBox" Name="reference" PropertyName="SelectedValue"
                                            Type="String" />
                                        <asp:ControlParameter ControlID="ThemeVisiteComboBox" Name="idThemeVisite" PropertyName="SelectedValue"
                                            Type="Int32" />
                                        <asp:ControlParameter ControlID="CategorieFilterComboBox" Name="code" PropertyName="SelectedValue"
                                            Type="String" />
                                        <asp:ControlParameter ControlID="ObjetSearchTextBox" Name="search" PropertyName="Text"
                                            Type="String" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                                <telerik:RadListView ID="ObjetListView" runat="server" Width="100%" ItemPlaceholderID="ProductsHolder"
                                    AllowPaging="True" DataSourceID="ODSObjet">
                                    <LayoutTemplate>
                                        <div id="ProductsHolder" width="100%" scrollbars="Vertical" runat="server" cssclass="qsfClear" />
                                    </LayoutTemplate>
                                    <EmptyDataTemplate>
                                        <div class="RadListView RadListView_Default">
                                            <div class="rlvEmpty">
                                                There are no items to be displayed.</div>
                                        </div>
                                    </EmptyDataTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton Width="120px" ID="LinkButton1" CssClass="selectedButtons" runat="server"
                                            CommandName="Select" OnClick='<%#"ObjetOnClick("+ Eval("idObjet")+ ")"%>'>
                                            <table cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td>
                                                        <center>
                                                            <Local:CustomImage runat="server" ImageUrl='<%#Eval("PictogrammeObjetHasDocument.Document.CheminApercu")%>'
                                                                ID="CustomImage1" Height="100" Width="110" />
                                                        </center>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="padding-left: 0px;">
                                                        <center>
                                                            <asp:Label ID="Label1" Text='<%#Eval("Libelle")%>' ForeColor="#5a9b39" runat="server" />
                                                        </center>
                                                        <%--<br />
                                                        <asp:Label ID="Label2" Text='N°Inv. : ' runat="server" /><br />
                                                        <asp:Label ID="Label3" Text='<%#Eval("id_DCNS")%>' runat="server" />--%>
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    <AlternatingItemTemplate>
                                        <asp:LinkButton Width="120px" ID="LinkButton2" CssClass="selectedButtons" runat="server"
                                            CommandName="Select" OnClick='<%#"ObjetOnClick("+ Eval("idObjet")+ ")"%>'>
                                            <table cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td>
                                                        <center>
                                                            <Local:CustomImage runat="server" ImageUrl='<%#Eval("PictogrammeObjetHasDocument.Document.CheminApercu")%>'
                                                                ID="CustomImage1" Height="100" Width="110" />
                                                        </center>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="padding-left: 0px;">
                                                        <center>
                                                            <asp:Label ID="Label1" Text='<%#Eval("Libelle")%>' ForeColor="#5a9b39" runat="server" />
                                                        </center>
                                                        <%--<br />
                                                        <asp:Label ID="Label2" Text='N°Inv. : ' runat="server" /><br />
                                                        <asp:Label ID="Label3" Text='<%#Eval("id_DCNS")%>' runat="server" />--%>
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:LinkButton>
                                        <div style="clear: left;" />
                                    </AlternatingItemTemplate>
                                    <SelectedItemTemplate>
                                        <asp:LinkButton Width="120px" ID="LinkButton2" CssClass="selectedButtons" runat="server"
                                            CommandName="Select" OnClick='<%#"ObjetOnClick("+ Eval("idObjet")+ ")"%>'>
                                            <table cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td>
                                                        <center>
                                                            <Local:CustomImage runat="server" ImageUrl='<%#Eval("PictogrammeObjetHasDocument.Document.CheminApercu")%>'
                                                                ID="CustomImage1" Height="100" Width="110" />
                                                        </center>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left" style="padding-left: 0px;">
                                                        <center>
                                                            <asp:Label ID="Label1" Text='<%#Eval("Libelle")%>' ForeColor="#5a9b39" runat="server" />
                                                        </center>
                                                        <%--<br />
                                                        <asp:Label ID="Label2" Text='N°Inv. : ' runat="server" /><br />
                                                        <asp:Label ID="Label3" Text='<%#Eval("id_DCNS")%>' runat="server" />--%>
                                                    </td>
                                                </tr>
                                            </table>
                                        </asp:LinkButton>
                                    </SelectedItemTemplate>
                                </telerik:RadListView>
                                <telerik:RadDataPager ID="ObjetDataPager" runat="server" PagedControlID="ObjetListView"
                                    Style="clear: left;" PageSize="10">
                                    <Fields>
                                        <telerik:RadDataPagerButtonField FieldType="Prev" />
                                        <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                        <telerik:RadDataPagerButtonField FieldType="Next" />
                                        <telerik:RadDataPagerTemplatePageField Visible="true">
                                            <PagerTemplate>
                                                <div>
                                                    <b>Objets
                                                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# (Container.Owner.TotalRowCount > 0)? Container.Owner.StartRowIndex+1:0%>" />
                                                        à
                                                        <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# SetPagerText(Container)%>" />
                                                        sur
                                                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                        <br />
                                                    </b>
                                                </div>
                                            </PagerTemplate>
                                        </telerik:RadDataPagerTemplatePageField>
                                    </Fields>
                                </telerik:RadDataPager>
                            </telerik:RadAjaxPanel>
                        </asp:Panel>
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
        </telerik:RadSplitter>
        </form>
    </body>
    </html>

    somme methods in code behind:
    protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs args)
        {
            this.UpdateToolTip(args.Value, args.UpdatePanel);
        }
     
        protected void RadGrid1_PageIndexChanged(object source, GridPageChangedEventArgs e)
        {
            RadToolTipManager1.TargetControls.Clear();
        }
     
        private void UpdateToolTip(string elementID, UpdatePanel panel)
        {
            Control ctrl = Page.LoadControl("DocumentDetails.ascx");
            panel.ContentTemplateContainer.Controls.Add(ctrl);
            DocumentDetails details = (DocumentDetails)ctrl;
            details.DocumentID = elementID;
        }
     
    //in protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
     ...  
     Control target = e.Item.FindControl("LabelLibelle");
                            if (!Object.Equals(target, null))
                            {
                                if (!Object.Equals(this.RadToolTipManager1, null))
                                {
                                    this.RadToolTipManager1.TargetControls.Add(target.ClientID, obj.idObjet.ToString(), true);
                                }
                            }
    ...

    Could you reproduce this effect?

    When I remove the propropery OnAjaxUpdate from RadToolTipManager, the tooltip is correctly displayed event after paging gird, but the content is empty (it's normal because i remove the property OnAjaxUpdate).

    Stephane.
  2. Stephane
    Stephane avatar
    27 posts
    Member since:
    Mar 2009

    Posted 05 Aug 2010 Link to this post

    Hi,

    I have a partial issue for this effect, when I set RestoreOriginalRenderDelegate to "True" in my RadAjaxManager all run perfectly.

    But When I set RestoreOriginalRenderDelegate to "False" it's not good.

    I must set RestoreOriginalRenderDelegate to "false" , because my web application runs under medium trust level, so my page inherits from RadjaxPage not from Page.

    Have you got an issue for this?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 09 Aug 2010 Link to this post

    Hi Stephane,

    To have the paging working properly, please make sure that you  update the RadToolTipManager as well every time you update the grid - e.g add ajax settings where needed. In case your problem persists, please modify your code in order to be simple enough and runnable and open a new support ticket and send it to me and I will do my best to help so that you will be then able to apply the same logic in your original application.


    Best wishes,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Stephane
    Stephane avatar
    27 posts
    Member since:
    Mar 2009

    Posted 09 Aug 2010 Link to this post

    Hi Svetlina,

    the RadToolTipManager is added correctly to the RadjaxManager.

    The toolTip works perfectly when the page is loaded for the first time. But when the RadGrid is updated by pager or a filter control (RadTextebox) the toltip does'nt work, you can see the configuration of my RadAjaxManager:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnResponseEnd="AjaxPanelCategorieFilterResponseEnd"
            OnAjaxRequest="AjaxPanelRecherche_AjaxRequest" RestoreOriginalRenderDelegate="false">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RechecheTextBox">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RechecheTextBoxClear">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="PanelRecherche" LoadingPanelID="RadAjaxLoadingPanel1"
                            UpdatePanelRenderMode="Inline" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    I focus your attention on the property "RestoreOriginalRenderDelegate" when these property is setting to false, the tooltip doesn't work but when it set to "true" the tooltip works.
  6. Answer
    Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 12 Aug 2010 Link to this post

    Hello Stephane,

     I believe that this property is most probably not the reason for the problem and it is useful when using Medium trust as explained below:

    http://www.telerik.com/help/aspnet-ajax/ajax-in-medium-trust.html

    In some situations this property makes AJAX not to work as explained here:

    http://www.telerik.com/help/aspnet-ajax/ajxlimitations.html

    and if the reason for teh problem is incorrect AJAX settings, if this property removes the AJAX it will seem as it fixed the issue but actually it just removes AJAX which is not the original goal.

    If you want to test whether the problem is actually in incorrect AJAX settings as I assume, you can try whether setting EnableAjax="false" or removing the manager for the test fixes the issue. If so, please examine your AJAX settings as already suggested and try to find the problem because I cannot see what is happening in your application based only on a separate fragments of code.

    If the issue persists, please prepare a sample, fully runnable reproduction demo, open a new support ticket and send it to us and we will see what is actually happening and we will do our best to help.

    Best wishes,
    Svetlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017