Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
189 views
I have a sample scenario where I want to update the Tooltip Text when a ajaxified button is clicked.  I could not succeed in doing so. Is this a bug?

ASPX
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
   <asp:ScriptManager id="ScriptManager1" runat="server"/>     
    <div> 
        <asp:Button runat="server" ID="button" OnClick="click" AccessKey="t" Text="Don't click, use Alt-T"  /> 
        <br /> 
        <asp:Label runat="server" id="label" Text="test"></asp:Label> 
        <tk:RadToolTip ID="ttTimesheetStatus" runat="server" Text="Prior to update" TargetControlID="label"  RelativeTo="Element" Skin="Default" ShowDelay="0" Position="TopRight" />   
    </div> 
   <radAjax:RadAjaxManager ID="radAjaxManager" runat="server">  
        <AjaxSettings> 
            <radAjax:AjaxSetting AjaxControlID="button">  
                <UpdatedControls> 
                    <%--<radAjax:AjaxUpdatedControl ControlID="label" />--%> 
                    <radAjax:AjaxUpdatedControl ControlID="ttTimesheetStatus" /> 
                </UpdatedControls> 
            </radAjax:AjaxSetting> 
        </AjaxSettings> 
    </radAjax:RadAjaxManager> 
    </form> 
</body> 
</html> 
 CS
public partial class _Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
 
    }  
 
    protected void click(object sender, EventArgs e)  
    {  
        ttTimesheetStatus.Text = "After Update";  
    }  
} 

Thanks.
Jonathan
Tsvetie
Telerik team
 answered on 01 Aug 2007
3 answers
178 views
Can someone explain to me in more detail the usage of the following function? I think I understand what it is doing, but I cannot modify it to do what I need. It is found here: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/MyPortal/DefaultCS.aspx

... below is the function usage:

ScriptManager.RegisterStartupScript(
            dock,
            this.GetType(),
            "AddDock",
            string.Format(@"function _addDock() {{
    Sys.Application.remove_load(_addDock);
    $find('{1}').dock($find('{0}'));
    $find('{0}').doPostBack('DockPositionChanged');
}};
Sys.Application.add_load(_addDock);", dock.ClientID, DropDownZone.SelectedValue),
            true);

If you go to the link I provided above, you see that it is adding docks every time you click a button. In my situation I need to add docks based on a list of RadDocks that I am passed. I have not been able to do this for some reason.

I tried something like this:

        List<RadDock> dockList = RetrieveListOfDocks();

        foreach (RadDock dock in dockList)
        {
            UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);

            ScriptManager.RegisterStartupScript(
            dock,
            this.GetType(),
            "AddDock",
            string.Format(@"function _addDock() {{
            Sys.Application.remove_load(_addDock);
            $find('{1}').dock($find('{0}'));
            $find('{0}').doPostBack('DockPositionChanged');
            }};
            Sys.Application.add_load(_addDock);", dock.ClientID, RadDockZone1),
            true);
        }

But given my limited understanding of the control functions and the new framework, this did not work. My ultimate goal is to do a partial page postback (using the UpdatePanel) with different collections of RadDocks each time... so an event is fired, and new RadDocks appear in a RadDockZone of a page... Any help and guidance would be great.

Petya
Telerik team
 answered on 31 Jul 2007
1 answer
258 views
Hi Telerik,


I'm trying to update the RadToolTipManager by using an RadAjaxManager. The tooltip works fine on the initial page-request but disappears on the ajax-postback.

To illustrate, I've made the simplest possible example, that is like the scenario I need. May I emphasize that, yes, in this simple example you could make this work another way, but I would have to rebuilt some complicated stuff in the actual environment, to do it another way.

Code-ahead:

<asp:ScriptManager runat="server" /> 
             
            <asp:Button ID="ReDataBindButton" Text="Re-databind plx" OnClick="ReDataBindButton_Click" runat="server" /> 
             
            <asp:Panel ID="TesterPanel" runat="server"> 
                <asp:Repeater ID="TesterRepeater" runat="server" OnItemDataBound="TesterRepeater_ItemDataBound"> 
                    <ItemTemplate> 
                        <asp:Label ID="TesterLabel" runat="server" /> 
                    </ItemTemplate> 
                </asp:Repeater> 
            </asp:Panel> 
             
            <radA:AjaxLoadingPanel ID="TesterLoadingPanel" runat="server" Height="75px" Width="75px"> 
                <asp:Image runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /> 
            </radA:AjaxLoadingPanel> 
             
            <telerik:RadToolTipManager ID="TesterRadToolTipManager" runat="server" /> 
             
            <radA:RadAjaxManager ID="TesterRadAjaxManager" runat="server"> 
                <AjaxSettings> 
                    <radA:AjaxSetting AjaxControlID="ReDataBindButton"> 
                        <UpdatedControls> 
                            <radA:AjaxUpdatedControl ControlID="TesterPanel" LoadingPanelID="TesterLoadingPanel" /> 
                            <radA:AjaxUpdatedControl ControlID="TesterRadToolTipManager" /> 
                        </UpdatedControls> 
                    </radA:AjaxSetting> 
                </AjaxSettings> 
            </radA:RadAjaxManager> 

Code-behind ;):

protected void Page_Load(object sender, EventArgs e) 
    { 
        this.DataBindStuff(); 
    } 
 
    private void DataBindStuff() 
    { 
        List<string> items = new List<string>(); 
        items.Add("item1"); 
        items.Add("item2"); 
        items.Add("item3"); 
        items.Add("item4"); 
        items.Add("item5"); 
 
        TesterRepeater.DataSource = items; 
        TesterRepeater.DataBind(); 
    } 
 
    protected void ReDataBindButton_Click(object sender, EventArgs e) 
    { 
        this.DataBindStuff(); 
    } 
 
    protected void TesterRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) 
    { 
        if (!(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)) 
            return; 
 
        Label TesterLabel = (Label)e.Item.FindControl("TesterLabel"); 
        TesterLabel.Text = (string)e.Item.DataItem; 
        TesterRadToolTipManager.TargetControls.Add(TesterLabel.ClientID, true); 
    } 

Looking forward to your answer.

Best regards,
Emil Hjordt Jensen
Petio Petkov
Telerik team
 answered on 31 Jul 2007
1 answer
128 views
it may sound like dump question
i didn't understood what it is, does it a new developer suit of microsoft, and you suply new way to work with it (like silverlight), or is it a in telerik product? 
Sebastian
Telerik team
 answered on 31 Jul 2007
1 answer
154 views
How to take Backup and Restore sharepoint site
Lini
Telerik team
 answered on 31 Jul 2007
4 answers
180 views
I added the web part to my page, but when I click on the link button, it does not do anything and the IE bottom border flashes - Error on page. The image icon and the table icon work fine. The page is a blank web part page with no content.

I want to use your editor because the out of the box Sharepoint content editor web part changes relative links to absolute. I can't test your web part if the link tool does not work however.

Thanks,

Samantha
Lini
Telerik team
 answered on 31 Jul 2007
2 answers
306 views
Hello,
I have a user control with RadEditor, and then I load this user control into a RadDock object. I set the Ajax manager proxy to update the RadEditor. However, when I click the editor pencil icon, cancel/update button, the loading panel is not showing any image or loading text.

Thank you in advance for any help.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HTMLModule.ascx.cs" Inherits="HLS.modules.HTMLModule" %> 
 
<asp:ScriptManagerProxy ID="HTMLModuleSMP" runat="server"></asp:ScriptManagerProxy> 
<telerik:RadAjaxManagerProxy ID="HTMLModuleRAMP" runat="server"> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="HTMLEditor"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="HTMLEditor" LoadingPanelID="HTMLEditorALP" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
<radE:RadEditor ID="HTMLEditor" runat="server"  
CausesValidation="False"  
OnCancelClicked="HTMLEditor_CancelClicked"  
OnSubmitClicked="HTMLEditor_SubmitClicked"  
EnableViewState="False" 
Width="100%" 
Height="650px"  
Editable="false" 
> 
</radE:RadEditor> 
<telerik:RadAjaxLoadingPanel ID="HTMLEditorALP" runat="server" Height="75px" Width="75px" > 
    <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" /></telerik:RadAjaxLoadingPanel> 
 

HHalim
Top achievements
Rank 2
 answered on 30 Jul 2007
2 answers
369 views
I need to reset (clear) the text area of Rad Editor (contained in a MOSS template) from Javascript.

<radE:RadHtmlField ID="RadEditorText2E" FieldName="AMCText2XHTML" runat="server" AllowFonts="False" AllowHtmlSourceEditing="True" DisplayHeight="400px" DisplayWidth="430px" DisableCustomStyles="True"/>

I have found this info in a thread:
<rade:radEditor id= "RadEditor1" runat= "server"></rade:radEditor>
    var editor = <%=RadEditor1.ClientID %>; //get a reference 
     editor.SetHtml("");

But this does not work with MOSS - how could it -
<%=RadEditorText2E.ClientID %> returns a string. How can I get the necessary reference. And what kind of object does the reference point to. I can get a reference to the text area HTML element: <textarea style='display:none' id='RadEContentHiddenTextareactl00_PlaceHolderMain_TextPanel2E_RadEditorText2E_ctl00' .....
But clearing the value of this text area does not work.

Thank you in advance for help.

Regards,

Hugo
mayerh2
Top achievements
Rank 1
 answered on 30 Jul 2007
1 answer
229 views
Hi,

I am having 2 issues with tooltip.

1. I use the Tooltip entirely in code-behind.  In one case there is a usercontrol where I create the tooltip manager and generate the tooltip for individual elements and bind the client id using radToolTipManager1.TargetControls.Add. I then bind the radToolTipManager to a Placeholder control. The problem here is for the first load, the ToolTip appears fine but whenever there is a postback, the tooltip disappears and I get the IE's tooltip (like Alt on the Element)
One requirement of the application I am working with is I have to repaint the entire content of the user control so on every postback, I do
phToolTipManagerPlaceholder.Controls.Clear();
//(phPlaceholder is the Placeholder to which the ToolTipManager is bounded)
radToolTipManager1.Controls.Clear();

Is there a better way to implement the Tooltips for postbacks and a way to ensure the ToolTipManager is always cleared?

2. I noticed the issue in Firefox and not sure if its me. This occurs in Firefox on one of the Samples. http://www.telerik.com/DEMOS/ASPNET/Prometheus/ToolTip/Examples/ShowEvent/DefaultCS.aspx
The first page load is fine, but when there is a postback (click on the submit there is no ToolTip Text).
It looks like the screenshot below.
http://img171.imageshack.us/img171/7127/tooltiphl4.jpg

I do notice when I debug using Firebug, the hidden DIVs that are rendered for Tooltips not having the content. Is there a way to fix this.

Thanks so much in advance.          


Tsvetie
Telerik team
 answered on 30 Jul 2007
3 answers
104 views
In IE6, the custom command button does not appear in the titlebar. Instead, it's below the other commands. It manages to get stuck under the dock content. Is there any way to get the command back on the titlebar?
Petya
Telerik team
 answered on 30 Jul 2007
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?