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

RadAjaxManager, RadToolTip and RadWindow

3 Answers 152 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
avi
Top achievements
Rank 1
avi asked on 27 Nov 2010, 09:49 AM
Hi,

I wish to implement the following:
Present a RadToolTip within a RadWindow that has a RadAjaxManager to present nofications to the user on several ocassions (e.g. input was not properly given). So I put it in RadAJAx setting along with an imageButton I wish to present it accordingly. Also size of the RadWindow is not automatically fitting when using RadAjaxManager (if I drop the use of RadAjaxManager, it works fine).

That's the code, for example:
1. RadWindow Code - rtt is the RadToolTip I wish to show on occassions:
<telerik:RadAjaxManager ID="ramPopup" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ibFind">
            <UpdatedControls>                
                <telerik:AjaxUpdatedControl ControlID="ibFind" LoadingPanelID="ralpLoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="rgGrid" LoadingPanelID="ralpLoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="cvSearchArgs" />                    
                <telerik:AjaxUpdatedControl ControlID="rtt" LoadingPanelID="ralpLoadingPanel"/>   
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rgGrid">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rgGrid" LoadingPanelID="ralpLoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="rtt" LoadingPanelID="ralpLoadingPanel"/>
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ibSelect">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ibSelectIndividual" LoadingPanelID="ralpLoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="rtt" LoadingPanelID="ralpLoadingPanel"/>
                <telerik:AjaxUpdatedControl ControlID="script" />
            </UpdatedControls>
        </telerik:AjaxSetting>
     </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadToolTip ID="rtt" runat="server"                
    EnableShadow="true" 
    IsClientID="true" 
    EnableViewState="true" 
    ShowCallout="false"
    Position="Center"
    Animation="Slide"
    AutoCloseDelay="6000"
    Width="400px"                    
    >
    <div id="Div1" class="message message-notice">
        <div class="image">
            <img src="/resources/images/icons/notice.png" alt="Error" height="32" />
        </div>
        <div class="text">
            <asp:Label runat="server" id="lblNotification" ></asp:Label>
        </div>
        <div class="dismiss">
            <a href="#message-error"></a>
        </div>
    </div>
</telerik:RadToolTip>

and the code behind - whenever I wish to present the RTT I use:
private void displayNotification(string notification)
{
    lblNotification.Text = notification;
    rtt.Show();
}


2. the code that opens the RadWindow (from an aspx page) and get necessary arguments from the RadWindow:
<telerik:RadWindowManager ID="rwmPopUps" runat="server" Skin="Vista">
    <Windows>
        <telerik:RadWindow Skin="Vista" ID="rw" runat="server" Title="Subject Search" 
           Left="150px" ReloadOnShow="true" Modal="true" AutoSize="true" Style="z-index:2000" />
    </Windows>
</telerik:RadWindowManager>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function ShowProviderForm() {
            window.radopen("NewPopUp.aspx", "rw");
            return false;
        }
        function refreshData(arg) {
            if (arg) {
                $find("<%= ramRequestEntry.ClientID %>").ajaxRequest(arg);
            }
        }
    </script>
</telerik:RadCodeBlock>

3. codebehind example for use - CloseAndRebind is a javascript function within RadWindow (this function it works peorperly):
protected void ibSelect_Click(object sender, ImageClickEventArgs e)
{
    if (rgGridInviduals.SelectedValue != null)
    {
        string selected = rgGrid.SelectedValue.ToString();
        clearForm();
        RadScriptManager.RegisterStartupScript(Page,
            Page.GetType(),
            "Selected",
            string.Format("CloseAndRebind('{0}');", selected),
            true);
    }
    else
    {
        displayNotification("Please select a subject");
    }
}


The results are:
1. When I delete RadAjaxManager use - everything works fine.
2. When I put it RadAjaxManager back in, the ToolTip is not presented
3. Also, when I use RadAjaxManager the size of the RadWindow is not automatically fitting the form, when the form changes its size
4. Without using RadAjaxManager, the RadWindow's size is modified automaticcaly to the contents of the form (as it should be)

I wish to use RadAjaxManager and get the following results:
1. The RadWindow's size is modified automatically to the contents of the form.
2. The RadToolTip must be showed.
3. The ToolTip must be given a CSS style (this one is not ralated to RagAjaxManager, but I'm not able to use a CSS in rtt within a RadWindow - in other forms, which are not RadWindow, it works.)

Most important - The RadWindow size must fit automatically to form size (The form's size is modified since the RadGrid changes its size almost every postback).

Thanks in advance.

Best regards,
Avi Akessoul

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 30 Nov 2010, 02:07 PM
Hi Avi,

Could you please try to modify the ajax settings by set the RadWindowManager to be updated control and also the ToolTip control to update itself. Let me know if this makes any difference.

Kind regards,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
avi
Top achievements
Rank 1
answered on 06 Dec 2010, 03:38 PM
Hi,

The RadWindowManager modification didn't solve the problem.

The RadToolTip updates itself (it was solved) and now it is displayed, but the RadToolTip lost its CSS style (the CSS file is taken from the project). Any way to improve this one (I want to use CSS)?

Thanks for the suggestions. I'll keep track of the forum.

Avi
0
Maria Ilieva
Telerik team
answered on 09 Dec 2010, 01:50 PM
Hello,

As the provided information is not enough to isolate the root cause of the issue you are facing, please prepare a simple, fully runnable reproduction demo, open a new support ticket and send it to us along with very detailed reproduction steps and explanations and we will debug it locally and we will do our best to help.


Best wishes,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Ajax
Asked by
avi
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
avi
Top achievements
Rank 1
Share this question
or