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

RadToolTipManager OnClientHide event fires when page first loads

2 Answers 14 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Dash
Top achievements
Rank 1
Dash asked on 18 Oct 2013, 08:53 PM
I have a RadToolTipManager that I want the onclientHide event to cause the page to reload, but when I handle the event it fires when the page loads

<telerik:RadAjaxPanel LoadingPanelID="OrderAdminLoadingPanel" runat="server">
      <telerik:RadToolTipManager runat="server" Modal="True"  Enabled="False" ID="RmaToolTipManager" ShowCallout="False" ShowEvent="OnClick"
                RelativeTo="BrowserWindow" Width="600" Style="z-index: 31000" Title="" Position="Center"
                    HideEvent="ManualClose" Animation="Fade" OnClientHide="alert('test')" OnAjaxUpdate="RmaToolTipManager_OnAjaxUpdate" RenderInPageRoot="True">
</telerik:RadToolTipManager>
        <div class="ctrydrop">
            Country:
            <asp:DropDownList runat="server" AutoPostBack="True"
                OnSelectedIndexChanged="CountryDropDown_OnSelectedIndexChanged"
                OnDataBound="CountryDropDown_OnDataBound" ID="CountryDropDown"
                DataTextField="CountryISO2Code" DataValueField="CountryISO2Code" />
        </div>
        <div class="griddiv" style="padding-left:20px; padding-right:20px">
            <telerik:RadGrid runat="server" ID="OrderAdminGrid"
                AllowCustomPaging="False" ShowGroupPanel="False" PageSize="15"
                AllowMultiRowSelection="True" AllowAutomaticDeletes="False"
                AllowAutomaticInserts="False" AllowPaging="true"
                ShowStatusBar="False" AllowSorting="True"
                EnableViewState="True" AutoGenerateColumns="False" AllowFilteringByColumn="true"
                DataSourceID="OrderAdminDataSource"
                OnItemCommand="OrderAdminGrid_OnItemCommand"
                OnItemCreated="OrderAdminGrid_OnItemCreated"
                OnItemDataBound="OrderAdminGrid_OnItemDataBound">
                <GroupingSettings CaseSensitive="False"></GroupingSettings>
                <clientsettings AllowColumnsReorder="False" enablerowhoverstyle="True">
                   <Selecting AllowRowSelect="True"></Selecting>
                   <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True"
                       AllowColumnResize="True"></Resizing>
                </clientsettings>
                <pagerstyle mode="NextPrevNumericAndAdvanced" AlwaysVisible="True"></pagerstyle>
                <mastertableview autogeneratecolumns="False" datakeynames="OrderId"
                    editmode="EditForms" nomasterrecordstext="No orders found." allowsorting="True"
                    allowmulticolumnsorting="False">
                    <Columns>
                        <telerik:GridTemplateColumn HeaderStyle-CssClass="order-admin-select-column-header"
                                    ItemStyle-CssClass="order-admin-select-column" HeaderText="Select" AllowFiltering="False">
                            <ItemTemplate>
                                <asp:CheckBox ID="SelectCheckBox" runat="server"/>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn UniqueName="OrderNumber" DataField="OrderNumber" AutoPostBackOnFilter="True" HeaderText="Order Number"
                                    HeaderStyle-CssClass="order-admin-order-number-column-header" ItemStyle-CssClass="order-admin-order-number-column"
                             ShowSortIcon="True" ShowFilterIcon="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerName" AutoPostBackOnFilter="True" HeaderText="Customer Name"
                                    HeaderStyle-CssClass="order-admin-select-column-header" ItemStyle-CssClass="order-admin-select-column"
                            ShowFilterIcon="False" >
                            <HeaderStyle HorizontalAlign="Center" Width="110px" />     
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerEmail" AutoPostBackOnFilter="True" HeaderText="Customer Email"
                            ShowSortIcon="True" ShowFilterIcon="False" >
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />   
                        </telerik:GridBoundColumn>
                        <telerik:GridDateTimeColumn DataField="OrderDate"  AllowFiltering="True" EnableRangeFiltering="True"  AutoPostBackOnFilter="True" HeaderText="Order Date"
                             ShowSortIcon="True" SortExpression="OrderDate" PickerType="DatePicker" EnableTimeIndependentFiltering="True" FilterListOptions="VaryByDataType"
                             DataFormatString="{0:MM/dd/yyyy}" ShowFilterIcon="False">
                         <HeaderStyle HorizontalAlign="Center" Width="165px" />
                        <ItemStyle HorizontalAlign="Center" />
                       </telerik:GridDateTimeColumn>
                        <custom:FilteringGridBoundColumn UniqueName="OrderStatus" DataField="OrderStatus" HeaderText="Order Status" />
                        <custom:FilteringGridBoundColumn UniqueName="ShippingMethod" DataField="ShippingMethod" HeaderText="Shipping Method" />
                        <custom:FilteringGridBoundColumn UniqueName="ShipmentStatus" DataField="ShipmentStatus" HeaderText="Shipment Status" />
                        <telerik:GridBoundColumn  DataField="OrderTotal" AutoPostBackOnFilter="True" HeaderText="Order Total"
                            DataFormatString="{0:C}" ShowSortIcon="True" ShowFilterIcon="True" ></telerik:GridBoundColumn>                  
                       <telerik:GridTemplateColumn HeaderText="View Detail"  AllowFiltering="False" >
                            <ItemTemplate>
                                <div>
                                    <asp:ImageButton ID="ViewDetailButton" runat="server" ImageUrl="images/mag.png" OnClientClick='<%#String.Format("openRadWin(\"{0}?pstordrnum=\",\"{1}\"); return false;", GetViewDetailPageUrl(), Eval("OrderNumber")) %>' />
                                </div>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="40px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Return" AllowFiltering="False" Visible="False">
                            <ItemTemplate>
                                <div>
                                    <asp:ImageButton ID="ReturnButton" runat="server" ImageUrl="images/Return.png" Enabled="False" CommandArgument='<%# Eval("OrderId") %>'/>
                                </div>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="50px" />
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Notes" AllowFiltering="False" Visible="True">
                            <ItemTemplate>
                                <div>
                                    <asp:ImageButton ID="NotesButton" runat="server" ImageUrl="images/Comment.png" Enabled="True" CommandArgument='<%# Eval("OrderId") %>'/>
                                </div>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="60px" />
                        </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn HeaderText ="Process Refund" Visible="False" AllowFiltering="False" >
                           <ItemTemplate>
                                <div>
                                    <asp:ImageButton Visible="False" ID="DoProcessReturn" runat="server" ImageUrl="images/refund.png" Enabled="True" CommandArgument='<%# Eval("OrderId") %>' />
                                </div>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="60px" />
                       </telerik:GridTemplateColumn>
                    </Columns>
                </mastertableview>
            </telerik:RadGrid>
        </div>
        <div class="selbut">
            <asp:Button runat="server" Text="Select All" ID="SelectAllButton" OnClick="SelectAllButton_OnClick" />
            <asp:Button runat="server" Text="Clear Filters" ID="ClearFiltersButton" OnClick="ClearFiltersButton_OnClick"/>
        </div>
        <div>
            <asp:Label runat="server" ID="StatusLabel"></asp:Label>
        </div>
    </telerik:RadAjaxPanel>


Any help would be great!

Thanks

Dash

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 21 Oct 2013, 12:09 PM
Hello Dash,

Our controls only need the name of the JavaScript function, without the parentheses:
<telerik:RadToolTipManager runat="server" Modal="True"  Enabled="False" ID="RmaToolTipManager" ShowCallout="False" ShowEvent="OnClick"
                RelativeTo="BrowserWindow" Width="600" Style="z-index: 31000" Title="" Position="Center"
                    HideEvent="ManualClose" Animation="Fade" OnClientHide="myHandler" OnAjaxUpdate="RmaToolTipManager_OnAjaxUpdate" RenderInPageRoot="True">
</telerik:RadToolTipManager>

function myHandler(sender, args) {
 alert("an alert");
}

More details can be found in this post: http://blogs.telerik.com/aspnet-ajax/posts/12-08-10/migrating-onclientclick-handlers-from-asp-button-to-telerik-s-asp-net-ajax-button.aspx.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Dash
Top achievements
Rank 1
answered on 21 Oct 2013, 03:24 PM
Thank you very much. Works like a champ now.
Tags
ToolTip
Asked by
Dash
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Dash
Top achievements
Rank 1
Share this question
or