Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
134 views
Dear Sir,

I can't find information about OnClientLoaded event in the document...
do you guys miss it??
Jason Lee
Top achievements
Rank 1
 answered on 22 Oct 2007
1 answer
139 views

I am using RADEditor for MOSS. I created function to set focus in textbox and assigned

RadEditor.OnClientLoad = "JavaScript function name";

my code to set focus is in JavaScript function.

My problem is that javascript function executes fine in IE6, but it doesn't set focus in textbox. Same code works fine in Firefox.

Can anybody please help me?

Georgi Tunev
Telerik team
 answered on 22 Oct 2007
1 answer
172 views
Hello

How to user german language (tooltips) in Radwindow Prometheus?
I cannot find a property to set it to de-DE

regards
Petya
Telerik team
 answered on 22 Oct 2007
1 answer
265 views
I've run into a problem when I use an RadAjaxManager on a control that contains controls from the AjaxControlToolkit.  It seems the minimal amount of code to cause the problem is to take a control deriving from INamingContainer such as a wizard and either place it in a RadAjaxPanel or reference it in a RadAjaxManager.  Then place an AjaxControlToolkit control such as the MaskedEditControl on the page.

When an async postback occurs an "Object reference not set to an instance of an object." error is thrown. 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<script type="text/C#" runat="server">  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        foreach (ScriptReference reference in ScriptObjectBuilder.GetScriptReferences(typeof(MaskedEditExtender)))  
            ScriptManager1.Scripts.Add(reference);  
    }  
</script> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<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" OnAsyncPostBackError="ScriptManager1_AsyncPostBackError" />                
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Wizard1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Wizard1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:Wizard ID="Wizard1" runat="server">  
            <WizardSteps> 
                <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">  
                    Empty Step  
                </asp:WizardStep> 
                <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">  
                    <asp:TextBox ID="FaxPhone" runat="server" /> 
                    <ajaxToolkit:MaskedEditExtender ID="FaxPhoneEx" TargetControlID="FaxPhone" 
                        Mask="(999) 999-9999" ClearMaskOnLostFocus="false" MessageValidatorTip="true" 
                        MaskType="Number" ErrorTooltipEnabled="True" runat="server" /> 
                </asp:WizardStep> 
                <asp:WizardStep ID="WizardStep3" runat="server" Title="Step 3">  
                    Last Step  
                </asp:WizardStep> 
            </WizardSteps> 
        </asp:Wizard> 
    </form> 
</body> 
</html> 
 


A little debugging showed the error was coming from the ExtenderControlBase.GetScriptDescriptors method in the AjaxControlToolkit and the targetControl parameter provided was null.

I've found a temporary solution where I handle the OnPreRender event of each AjaxControlToolkit control and set it's TargetControlID to the UniqueID of the target control.  Is this a bug in the RadAjaxManager or is this temporary solution the correct solution?

protected void ExtenderControl_PreRender(object sender, EventArgs e)  
{  
    ExtenderControl control = sender as ExtenderControl;  
    control.TargetControlID = control.FindControl(control.TargetControlID).UniqueID;  
} 

Thanks,
Chris

Petja
Telerik team
 answered on 22 Oct 2007
5 answers
338 views
I have been through the different examples of using MasterPages and UserControls with RadAjax for a couple of days.  I have gotten pretty far.  Here is my masterpage (relevant sections only):

        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True" /> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" height="75px" width="75px" Transparency="10"> 
            <asp:Image ID="Image1" ImageUrl="~/Img/Loading.gif" BorderWidth="0px" AlternateText="Loading" 
                runat="server" Style="margin-top: 45px;"></asp:Image> 
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%"> 
            <telerik:RadPane ID="navigationPane" runat="server" Height="100%" Width="150"> 
              <!-- Navigation elements --> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="NavigationSplitBar" runat="server" CollapseMode="Forward"></telerik:RadSplitBar> 
            <telerik:RadPane ID="contentPane" runat="server" Scrolling="none"> 
                <telerik:RadSplitter ID="MasterDetailSplitter" runat="server" Orientation="Horizontal"> 
                    <telerik:RadPane ID="topPane" runat="server"> 
                        <asp:ContentPlaceHolder ID="MainPlaceHolder" runat="server" /> 
                    </telerik:RadPane> 
                    <telerik:RadSplitBar ID="MasterDetailSplitBar" runat="server" CollapseMode="Both" Height="50%"></telerik:RadSplitBar> 
                    <telerik:RadPane ID="bottomPane" runat="server" Height="50%"> 
                        <asp:ContentPlaceHolder ID="DetailPlaceHolder" runat="server" /> 
                    </telerik:RadPane> 
                </telerik:RadSplitter> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 

Here is my Default.aspx:
<asp:Content ContentPlaceHolderID="MainPlaceHolder" ID="Content1" runat="server"> 
    <uc1:MyGrid ID="MyGrid" runat="server"/> 
</asp:Content> 
 
<asp:Content ContentPlaceHolderID="DetailPlaceHolder" ID="Content2" runat="server"> 
    <asp:Panel ID="DetailPanel1" runat="server" /> 
</asp:Content> 
 

Default.aspx.cs:
            RadAjaxManager ajaxManager = Master.FindControl("RadAjaxManager1") as RadAjaxManager; 
 
            Control mainPlaceHolder = Master.FindControl("MainPlaceHolder"); 
            Control personnelGroupsGrid = mainPlaceHolder.FindControl("PersonnelGroupGrid1"); 
 
            Control detailPlaceHolder = Master.FindControl("DetailPlaceHolder"); 
            Control detailPanel = detailPlaceHolder.FindControl("DetailPanel1"); 
            
            RadAjaxLoadingPanel ajaxLoadingPanel = Master.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel; 
            ajaxManager.AjaxSettings.AddAjaxSetting(personnelGroupsGrid, detailPanel, ajaxLoadingPanel); 
            //Render user control 
            if (IsPostBack)
            { 
                Control c = GetRequiredPostBackControl(this); 
                if (c.ID == "btnEdit") 
                { 
                    LoadUserControl("~/UserControls/MyGrid.ascx", detailPanel);   
                } 
            } 

And the user control MyGrid.ascx:
<radG:RadGrid ID="MyGrid1" runat="server" AutoGenerateColumns="False" GridLines="Horizontal" 
        PageSize="4" AllowMultiRowEdit="True" AllowAutomaticDeletes="True" 
        Width="476px" DataSourceID="XmlDataSource1" EnableAJAX="False"> 
        <MasterTableView CommandItemDisplay="Top" TableLayout="Fixed" DataSourceID="XmlDataSource1"> 
            <CommandItemTemplate> 
                <!-- Command bar and tool tips --> 
                <asp:ImageButton ID="btnNew" runat="server" CausesValidation="false" ImageUrl="../Img/Add_Image.png" /> 
                <!-- snip --> 
            </CommandItemTemplate> 
            <ExpandCollapseColumn Resizable="False" Visible="False"> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <RowIndicatorColumn Visible="False"> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <Columns> 
                <radG:GridBoundColumn DataField="name" HeaderText="Name" SortExpression="name" UniqueName="name"> 
                </radG:GridBoundColumn> 
                <radG:GridBoundColumn DataField="description" HeaderText="Description" SortExpression="description" UniqueName="description"> 


                </radG:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <ClientEvents OnRowSelected="RowSelected" /> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 
    </radG:RadGrid> 
Giuseppe
Telerik team
 answered on 22 Oct 2007
1 answer
275 views
// --> It seems you wire up the OnAsyncPostBackError event of the Script Manager and run any Logging that needs to be done there and you can change the output <-- //

I am now getting the following Stack Trace for my error that is occuring when I have a usercontrol inside a wizard. When I wire up a button to ajaxify the whole wizard and then click on a button that fires an event i get this error.

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetChildScriptDescriptorsRecursive(Control parent, ArrayList scriptDescriptors)

   at Telerik.Web.UI.ProxyScriptControl.GetScriptDescriptors()

   at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)

   at System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl)

   at Telerik.Web.UI.ProxyScriptControl.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.Control.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.Control.Render(HtmlTextWriter writer)

   at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.Control.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.PageRequestManager.RenderFormCallback(HtmlTextWriter writer, Control containerControl)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.HtmlFormWrapper.System.Web.UI.IHtmlForm.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.Page.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)

   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

   at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)

   at System.Web.UI.Page.Render(HtmlTextWriter writer)

   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)

   at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Wrote to Log: True



With the old RadAjaxManager there was a method called OnAjaxRequestError that could be called to catch erros and display them on screen. Now it appears that method is not there in Prometheus or I have totally missed it.

I am getting a rather ubiquitous error or Object reference is not set to an instance of an object. Just wonderign what I can use to catch the error and get a little bit more out of it.
Vlad
Telerik team
 answered on 22 Oct 2007
5 answers
506 views
I am hoping to overcome the infamous "Browser Back" issue.  When the user clicks on an item in a Radgrid and travels to a different page, I need to have that same grid and data available if the user navigates "Browser Back" to the page.  To do this, I am trying to use "Prometheus" Ajax.  I added the following to my page:

         <asp:ScriptManager runat="server" id="ScriptManager1">
         </asp:ScriptManager>
        
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  DefaultLoadingPanelID="loadingPanel" EnableHistory="True"> 
             <AjaxSettings> 
                 <telerik:AjaxSetting AjaxControlID="rgSearchResults"> 
                     <UpdatedControls> 
                         <telerik:AjaxUpdatedControl ControlID="rgSearchResults" LoadingPanelID="loadingPanel" /> 
                     </UpdatedControls> 
                 </telerik:AjaxSetting>  
              </AjaxSettings> 
         </telerik:RadAjaxManager> 

     <telerik:RadAjaxLoadingPanel ID="loadingPanel" runat="server" Width="75px" Height="75px" Transparency="20"> 
         <asp:Image ID="Image2" runat="server" AlternateText="Loading..." ImageUrl="RadControls/Ajax/Skins/Default/Loading.gif" /> 
     </telerik:RadAjaxLoadingPanel> 

where rgSearchResults is the radgrid that I am very interesting in preserving in the Browser Back situation.  I also turned off the ajax on rgSearchResults.  I don't experience any compilation errors, but I get a postback when I click within the grid on a linkbutton.  I then tried it on a simple linkbutton outside of the grid, but experienced the same result. 

I am not sure if it is related, but in my Source view, the editor underlines "ScriptManager" as an error (unrecognized), but does not produce an error.  It compiles.  If I look in my toolbox, there is in fact a ScriptManager, so I am not sure why it is underlining as an error.

I am not sure if this is related or not, but once I added the ScriptManager and AjaxManager, I received a js error on the page that reads: 'Sys' is undefined.  If I remove the ScriptManager and AjaxManager, the js error goes away.

Sharon
Top achievements
Rank 1
 answered on 19 Oct 2007
1 answer
126 views
I need to have the user select images from the database using dbcontentprovider (which is working BTW, thank you), and also be able to include files from the filesystem.  That is, I want to be able to create html that looks like this:

start:
<img  src="http://localhost:51833/KnovoloWeb/ItemHandler.aspx?path=Root/Content113/turtle.jpg" /><br />
<img alt="" src="/photo/img/01B.jpg" />
end:

Can I do this with different folders in the image manager button? Or, can I add a second Image Manager button to the editor, one for images from the file system and one for images from the database?

Thanks
Valeri Hristov
Telerik team
 answered on 19 Oct 2007
1 answer
117 views
I have an existing web application that i'm injecting the RAD Editor into. I have custom file browse and link tools (popups) that i need to use. how do i get them to interact with the editor? I've added a custom button to the tool bar but not sure how to update a link or image in the content.
Valeri Hristov
Telerik team
 answered on 19 Oct 2007
1 answer
95 views
I am testing RADEditor in FireFox, while I can perform the spell check and change the wrong spelling, I does not save the changed content. When I submit the content, I get the "RADEditor.Content" which is before the spell check execution.

Any workaround?
Rumen
Telerik team
 answered on 19 Oct 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?