Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
230 views
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
Maria Ilieva
Telerik team
 answered on 09 Dec 2010
5 answers
208 views
Hi,
 I have to add features of Track Changes as given in MS word.IS anyone have used such features in RADEditor.

Regards
Rashid
Rumen
Telerik team
 answered on 09 Dec 2010
3 answers
272 views
After looking around in some other threads and trying myself I am unable to rename or delete the top most node in the treeview. I have read that this is disabled but is there a way to enable this feature? I am currently using a custom DBContentProvidor so allowing the end user to rename the root nodes should be possible.
Fiko
Telerik team
 answered on 09 Dec 2010
1 answer
134 views
Hi. I'm using RadAjaxManager and it's client events OnRequestStart/End to do some client side stuff. Well recently a need came up to do something before each start and end events across all pages of the app. I thought it would be relatively simple by replacing OnRequestStart function via javascript's ".apply" method (you can see it in included code below). However, I ran into an issue where what I wanted to do only happens on second and all subsequent requests, BUT not on the first request. I even thought of using PageRequestManager's request begin/end events, but those happen after the AjaxManager events and I need to do things before those.  Below is timing of what happens, via firebug's console.log.

on ajax request start
begin request via PageRequestmanager
POST
end request via PageRequestmanager
on ajax request end

modified ajax start
on ajax request start
begin request via PageRequestmanager
POST
end request via PageRequestmanager
on ajax request end
modified ajax end

Again, second set is what I want to have happen, however Telerik must be doing something that's preventing me to replace RadAjaxManager OnRequestStart/End functions, like below, again it works just fine second time AjaxManager is triggered:
           var start = OnAjaxManagerRequestStart;
           OnAjaxManagerRequestStart = function() {
               console.log('modified ajax start');
               //doing something here
               start.apply(this, arguments);
           };

Code is below, any ideas?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="wPanelTest.aspx.cs" Inherits="wPanelTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"></head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <rad:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
            function OnAjaxManagerRequestStart(sender, eventArgs) {
                console.log('on ajax request start');
            }
            function OnAjaxManagerResponseEnd() {
                console.log('on ajax request end');
            }
        </script>

    </rad:RadCodeBlock>
    <div>
        <div>
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
            <asp:Label ID="Label1" runat="server" Text="I should be updated by button click"></asp:Label>
        </div>
        <rad:RadAjaxManager ID="RadAjaxManager1" runat="server" useembeddedscripts="false">
            <ClientEvents OnRequestStart="OnAjaxManagerRequestStart" OnResponseEnd="OnAjaxManagerResponseEnd" />
            <AjaxSettings>
                <rad:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <rad:AjaxUpdatedControl ControlID="Label1" />
                    </UpdatedControls>
                </rad:AjaxSetting>
            </AjaxSettings>
        </rad:RadAjaxManager>
    </div>
    </form>
   <script type="text/javascript">
       window.onload = function() {
           Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
           Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
           function BeginRequestHandler(sender, args) {
               console.log('begin request via PageRequestmanager');          
           }
           function EndRequestHandler(sender, args) {
               console.log('end request via PageRequestmanager');
           }

           var start = OnAjaxManagerRequestStart;
           OnAjaxManagerRequestStart = function() {
               console.log('modified ajax start');
               //doing something here
               start.apply(this, arguments);
           };
           var end = OnAjaxManagerResponseEnd;
           OnAjaxManagerResponseEnd = function() {
               end.apply(this);
               //doing something here
               console.log('modified ajax end');
           };
       };
    </script>    
</body>
</html>

CODEBEHIND:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class wPanelTest : System.Web.UI.Page
{
        protected void Button1_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(5000);
            Label1.Text = "I was updated via ajax manager at " + DateTime.Now;
        }
}
Maria Ilieva
Telerik team
 answered on 09 Dec 2010
1 answer
59 views
I have a page that is similar to a portal with multiple widgets on the page. Each widget has a "container" with the title of the widget. All the widgets are implemented as user controls. Within the container is the actual content of the widget.

Since I have a large number of these on the page, the page takes a while to render. For better user experience, I would like to have the titles of the widgets loaded first and then individual widgets show up as and when they load.

Can I use any of the telerik controls for this behavior?
Kiara
Top achievements
Rank 1
 answered on 09 Dec 2010
1 answer
222 views
<telerik:RadComboBox runat="server" ID="comboBoxA" EnableLoadOnDemand="true" OffsetX="170">
    <WebServiceSettings Method="GetItems" Path="WebService.asmx" />
</telerik:RadComboBox>

The above code demonstrates the issue I am having (for the WebService.asmx, use any code that sometimes returns no items).

When no items are returned, there is still an ugly, 2px line showing. This is because even if there are no items, the <ul> and other surrounding divs still render. If the <ul> tag has a border, as it does in many of the skins, then the ul's border still shows even when there are no items.

Unfortunately it is very difficult to fix this problem. CSS does not have the ability to hide the <ul> if it has no child <li> elements.

I have tried going down the javascript route, using OnClientItemsRequested or OnClientDropDownOpening, but have faced too many headaches.

Does anyone know of a good solution?
Kalina
Telerik team
 answered on 09 Dec 2010
1 answer
117 views
Hello,

I have a problem,
I need to change the localization of the radfileexplorer which is displayed immediatily after clicking the image button in the radeditor control (View the attached image). In other words, I need to change all text which is appears in the fileexplorer to arabic (for example). So how can I do that?

Here is my radeditor code:
<telerik:RadEditor DialogsCssFile="~/Common/css/RTLRadEditorStyle/RadEditor_Dialogs_RTL.css"></telerik:RadEditor>
                        <telerik:radeditor runat="server" ID="AnsrRadEditor" SkinID="DefaultSetOfTools" Width="80%" 
                            Height="700px" Content='<%# DataBinder.Eval( Container, "DataItem.Ansr") %>' DialogsCssFile="~/Common/css/RTLRadEditorStyle/RadEditor_Dialogs_RTL.css" ContentAreaCssFile="~/Common/css/RTLRadEditorStyle/EditorContentArea_RTL.css" >
                            <ImageManager ViewPaths="~/Forums/Pages/FAQs/Imgs" DeletePaths="~/Forums/Pages/FAQs/Imgs" UploadPaths="~/Forums/Pages/FAQs/Imgs" />
                        </telerik:radeditor>


Please, I need your help.
it is apprecited to send me the modified code.

Regards,
Bader
Rumen
Telerik team
 answered on 09 Dec 2010
1 answer
84 views
Hi
I create my treeitems on demand by a web service (RadTreeNodeData). On RadTreeNode is it possible to disable the contextmenue with EnableContextMenu = false. How do i that on a webservice?
Regards Markus
Nikolay Tsenkov
Telerik team
 answered on 09 Dec 2010
1 answer
101 views
sir,
i want to hide a combo box in advance form insert & edit templates when i selected a particular context menu item...

also how can i disable the inline insert & edit Templates ...


thank you
Nikolay Tsenkov
Telerik team
 answered on 09 Dec 2010
2 answers
158 views
How get a value GridBoundColumn in insert mode after button click?
xvikx
Top achievements
Rank 1
 answered on 09 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?