Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
321 views
We have some problems with the RadEditorMOSS 5.0.1.
When our users adds a bulleted list in the editor, it often ends up with an extra bullet. When they try to remove the bullet and then save, the bullet suddenly reappears. They have to do this three or four times before it disappears. What is the reason for this, and what can we do avoid it?

Thomas
Stanimir
Telerik team
 answered on 13 May 2010
1 answer
78 views

I have had the following code which was not working.  When i replaced RadAjaxManagerProxy  with RadAjaxManager, the code worked fine.

<telerik:RadCalendar ID="RadRadCalendar1"   AutoPostBack="true" runat="server" Skin="Web20" ></telerik:RadCalendar> 

<asp:Content runat=server ContentPlaceHolderID=Main>
    <telerik:RadAjaxManagerProxy  id="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting  AjaxControlID="RadRadCalendar1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl LoadingPanelID="Loadingpanel"   ControlID="RadRadCalendar1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

<asp:Content runat=server ContentPlaceHolderID=Main>
    <telerik:RadAjaxManagerProxy  id="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting  AjaxControlID="RadDatePicker1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl LoadingPanelID="Loadingpanel"   ControlID="RadDatePicker1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rcStartDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rcStartDate"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
RadAjaxManagerProxy   
Pavlina
Telerik team
 answered on 13 May 2010
3 answers
144 views
I have an OnClientSubmit callback in a RadEditor which detects whether there are incorrect widths and heights specified for images and corrects them.  Since there's no way to disable the browsers' built-in resizers that appear when you click on an image and drag the rectangle, we decided to implement an ajax call to resize local images (i.e. alter the image files) from the OnClientSubmit call to match on the requested size of the image.

This appears to work in IE6-8 but on Firefox, the postback happens before the AJAX call has completed.  It looks to me like the AJAX callback is left hanging.   Is there something else I need to do to keep the postback from happening before my callback is complete?

Thanks!

-Mike

 
<script type="text/javascript">  
 
 
function OnResizeCallbackSuccess(result, userContext) { 
    alert("Success="+result.Success+": "+result.ErrorMessage); 
 
function OnResizeCallbackFailed(err, context) { 
    alert("We are temporarily unable to check the images.  Please try again in a few minutes. (" + err.get_message() + ")"); 
 
function OnResizeCallbackTimeout(result, userContext) { 
    alert("We are unable to access the server.  Please try again in a few minutes. (" + 
                err.get_message() + ")"); 
 
function OnClientSubmit(editor) 
    var elems = editor.get_document().getElementsByTagName("img");   
    for (var i=0; i < elems.length; i++)   
    {   
        var image = elems[i]; 
        //alert("found image" +image.src+ " (w:"+image.width+" h:"+image.height); 
        var specifiedWidth=image.style.width.replace("px", ""); 
        var specifiedHeight=image.style.height.replace("px", ""); 
        if (!specifiedWidth) 
        { 
            specifiedWidth = image.getAttribute("width"); 
        } 
        if (!specifiedHeight) 
        { 
            specifiedHeight = image.getAttribute("height"); 
        } 
 
         
        image.style.width=""
        image.style.height=""
        image.removeAttribute("width"); 
        image.removeAttribute("height"); 
         
        imageimage.style.width=image.width; 
        imageimage.style.height=image.height; 
         
        image.setAttribute("width", image.width); 
        image.setAttribute("height", image.height); 
         
        var wasreset=false
        if (specifiedWidth && image.width != specifiedWidth) { 
            wasreset=true         
        } 
        if (specifiedHeight && image.height != specifiedHeight) { 
            wasreset=true
        } 
         
         
        if (wasreset) { 
            
            var svc = MyMailout.WebServices.ImageService; 
            svc.set_defaultSucceededCallback(OnResizeCallbackSuccess); 
            svc.set_defaultFailedCallback(OnResizeCallbackFailed); 
            svc.Resize(image.src, parseInt(specifiedWidth), parseInt(specifiedHeight)); 
             
             
        }; 
 
    }                    
     
     
    return true;     
 
 
 
</script> 
 
<body> 
    <form id="form1" runat="server"
        <telerik:RadScriptManager runat="server" id="radScriptManager"
    <Services> 
         <asp:ServiceReference Path="~/WebServices/ImageService.asmx" /> 
    </Services> 
     
     
    </telerik:RadScriptManager> 
     
      <telerik:RadAjaxManager ID="radAjaxManager" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnOk1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadEditor1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
      </telerik:RadAjaxManager> 
       
     
     
    <div> 
        <div><strong>Resize the image by clicking in it and dragging the boxes, then click "OK".</strong></div
     
        <telerik:RadEditor  
            ID="RadEditor1" Runat="server" Skin="Black"  
            EnableResize="true" 
            Width="750" 
            Height="500" 
            OnClientSubmit="OnClientSubmit" 
        > 
        <ImageManager  
            UploadPaths="~/Home/86"  
            ViewPaths="~/Home/86"  
            SearchPatterns="*.gif,*.jpg,*.jpeg,*.png"             
            /> 
            <Content>             
                <img src="http://localhost/Industry/images/Industry/logo.gif"></img> 
            </Content> 
        </telerik:RadEditor>     
        <asp:Button runat="server" id="btnOk" Text="OK" />   
    </div> 
    </form> 

Mike Bridge
Top achievements
Rank 1
 answered on 13 May 2010
2 answers
133 views
Hi,

I have a RadPanelBar with a TreeView contained within an ItemTemplate.

How do I handle a NodeClick event for the TreeView?  Before the TreeView was part of the PanelBar it was simple:

Private Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeview1.NodeClick

Now it is in the PanelBar VS doesn't like the Handles RadTreeview1.Nodeclick

Thanks in advance,

Kirk
Kirk Potter
Top achievements
Rank 1
 answered on 13 May 2010
6 answers
140 views
In my experimentation with your treeview I've been able to stylize individual nodes in any way I wished.  Now I've come across a situation where it doesn't seem to work.  The only difference is that the treeview sits in a sliding pane as follows:

        <telerik:RadSplitter ID="radSplitter" runat="server" Height="530" Width="1000" LiveResize="false">
          <telerik:RadPane ID="radPaneLeft" runat="server" Width="22" MinWidth="22" MaxWidth="22" Scrolling="None">
            <telerik:RadSlidingZone ID="radSlidingZone" runat="server" Width="22" ClickToOpen="true" ExpandedPaneId="radSlidingPane" DockedPaneId="radSlidingPane">
              <telerik:RadSlidingPane ID="radSlidingPane" runat="server" Title="Specify Path:" Width="265" ForeColor="Blue"
                                      TabView="ImageOnly" IconUrl="~/Images/hierarchy.gif" OnClientBeforeResize="radSlidingPane_BeforeResize" OnClientExpanded="radSlidingPane_Expanded">
                <div>
                  <asp:Panel ID="panelTree" runat="server" Width="250px" Height="400px" BorderColor="DarkGray" BorderStyle="Groove" BorderWidth="1">
                    <telerik:RadTreeView ID="treeViewMain" runat="server" . . .


Can you envision any situation that would prevent one from stylizing individual nodes?

Robert W.

Robert
Top achievements
Rank 1
 answered on 13 May 2010
7 answers
235 views
Having done a thorough search for the obvious, I figured I was better off just asking the experts here.

I have a custom/advanced edit form which is powered by a custom data provider.  This provider is capable of throwing custom exceptions that I would love to be able to catch and display a friendly error message to the user.  However, I can't seem to find where the heck to put a try catch block and what to wrap it around.  I'm believe that there would have to be one inside the AdvancedForm for insert/update cases as well as one in the page that hold the calendar in the case of moving an appointment from the calendar view.
T. Tsonev
Telerik team
 answered on 13 May 2010
2 answers
122 views
Howdy,

I just finishing battling getting the MOSSRadEditor into WSS3. The hyperlink manager works and things look good. Before I switched to MOSSRadEditor I was using RadEditor and it worked very well, I specified font sizes, and some custom toolbars. When I switch it to MOSSRadEditor I lost all of this cool stuff, AND the toolbar only appears when I click the content area, I'd rather it stay available at all times.

Here's my HTML

<rad:MOSSRadEditor ID="RadEditor1" runat="server" ToolbarMode="Default" ToolsFile="tools.xml"   
   ContentAreaCssFile="edit.css" OnClientCommandExecuting="OnClientCommandExecuting">  
    <realfontsizes> 
        <telerik:EditorRealFontSize Value="10pt" /> 
        <telerik:EditorRealFontSize Value="12pt" /> 
        <telerik:EditorRealFontSize Value="14pt" /> 
        <telerik:EditorRealFontSize Value="16pt" /> 
        <telerik:EditorRealFontSize Value="18pt" /> 
    </realfontsize> 

Some javascript
<script type="text/javascript">  
    //<![CDATA[  
 
 
    function OnClientCommandExecuting(editor, args) {  
        var name = args.get_name(); //The command name  
        var val = args.get_value(); //The tool that initiated the command  
 
        if (name == "DynamicDropdown" || name == "DynamicSplitButton") {  
            editor.pasteHtml(val);  
            //Cancel the further execution of the command  
            args.set_cancel(true);  
        }  
    }  
    //]]>  
</script> 

code behind is

    EditorToolGroup toolbar = new EditorToolGroup();  
    RadEditor1.Tools.Add(toolbar);  
    EditorDropDown ddn = new EditorDropDown("DynamicDropdown");  
    ddn.Text = "Layout Elements";  
    ddn.Attributes["width"] = "110px";  
    ddn.Attributes["popupwidth"] = "240px";  
    ddn.Attributes["popupheight"] = "100px";  
    ddn.Items.Add("2 Column Table""<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"620\"><tbody><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr></tbody></table><p>&nbsp;</p><p>&nbsp;</p>");  
    ddn.Items.Add("Page Break""<div class=\"page_break\" style=\"page-break-after:always\"></div>");  
    ddn.Items.Add("Section Header""<table border=\"1\" style=\"border-color: Black;\" width=\"620px\" cellpadding=\"5\" cellspacing=\"0\">" +  
            "<tr class=\"borderedtitle\"><td>V. Section Title</td></tr></table><p>&nbsp;</p><p>&nbsp;</p>");  
    toolbar.Tools.Add(ddn);  
    RadEditor1.ToolbarMode = EditorToolbarMode.Default; 


and the display is attached.
Delphi
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
93 views
Hi

I want to know that is it possible to add 2 or 3 icons parallel in Tree Node like in attachment?


thx
Yana
Telerik team
 answered on 13 May 2010
1 answer
95 views

Hi,

I am unable to bind EntiryDataSource control for RADGRID in SharePoint 2010 Visual Web Part.
but it's working fine for ASP.NET Web site.
Any clue or alternative approach will be highly appriceated.

Regards,
Suresh Kumar Udatha.

Iana Tsolova
Telerik team
 answered on 13 May 2010
1 answer
154 views
I installed RadControls for ASP.net AJAX Latest version 2010.1.415    and found that they could not be used with the asp.net ajax controle toolkit.  I downloaded the latest internal build and created a tab in the toolbox and imported the controls.

I am getting the following error.

Error Rendering Control - ScriptManagerAn unhandled exception has occurred.
[A]Telerik.Web.UI.RadScriptManager cannot be cast to [B]Telerik.Web.UI.RadScriptManager. Type A originates from 'Telerik.Web.UI, Version=2010.1.415.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\Dennis E Chipps\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\gcacis4j01\telerik.web.ui.dll'. Type B originates from 'Telerik.Web.UI, Version=2010.1.504.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' in the context 'LoadNeither' at location 'C:\Users\Dennis E Chipps\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\j9ejbnwh01\Telerik.Web.UI.dll'.
Iana Tsolova
Telerik team
 answered on 13 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?