Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
173 views

http://demos.telerik.com/aspnet-ajax/input/examples/common/orderform/defaultcs.aspx

On that page try paste some text into any textbox and then lose focus (click somewhere) and then again set focus on textbox. The text disappear! Why is that happening and how to avoid that?

It happens in FF and Opera. In IE 8 not.

Dimo
Telerik team
 answered on 13 May 2010
1 answer
83 views
I am developing a website and i need to deploy the soltion to different servers. I have added a custom dialog to the editor. No problem there. But everytime i make changes to the mosseditortools.js file i have to copy this file by hand to the various servers to the right location. Is there a way that i can let the editor look for a costum lacation for the mosseditortools.js file, preferably in the sharepoint 12 hyve. I read in the documentation that for instance the location of the toolfile.xml can be customized, is that also possible for the mosseditortools.js file so i can included it in my automated deployment?

Kind regards
Stanimir
Telerik team
 answered on 13 May 2010
1 answer
119 views
We have integrated the RadEditor with MOSS 2007.  The image manager is configured to load images from a specific list in the site but only shows 'Filename' and 'Size'.  Can this be changed to include additional columns in the underlying list?  Sometime images aren't name appropriately and it would be nice to have a 'Name' displayed as well.  See attached screen shot.

Thanks
Stanimir
Telerik team
 answered on 13 May 2010
4 answers
757 views
I am trying to remove the editing interfaces when a user is not allowed to edit the RadGrid contents. The grid has a master table view with 2 detail tables at the same level. In the grid's PreRender event, I use the following code to hide the edit and delete columns, but only the Master View's columns are hidden when the page is first rendered. Clicking the master grid's Refresh Data button then hides the detail tables' columns even if this code is prevented from re-running, so it seems the setting has been made, but not used during the first render. I have similar code in the ItemCreated event which sets the GridCommandItem display to None. That also displays correctly for the master table on the initial page render, but only takes affect for the detail tables after the Refresh Data. How can I hide the columns and command items during the first page rendering. I am using Telerik version 2010.1.415.35.

protected void RadGridSubjectArea_PreRender(object sender, EventArgs e)  
    {  
        Trace.Write("Event", this.ToString() + ": " + "RadGridSubjectArea_PreRender");  
        RadGrid grid = (RadGrid)sender;  
 
        bool editAllowed = this.isEditAllowed;  
        grid.AllowAutomaticInserts = editAllowed;   //Added safety since controls should be hidden  
        grid.AllowAutomaticDeletes = editAllowed;  
        grid.AllowAutomaticUpdates = editAllowed;  
 
        GridTableView view = grid.MasterTableView;  //Top-level view  
        //Set editability of this view and child views at any level  
        this.GridTableHierarchySetEditability(view, editAllowed);  
 
        //Try to force the display to refresh?
        //Clicking master grid's Refresh Data hides the columns even if this code is NOT re-run,
        // so it seems the setting has been made, but not used during the first render?
        //grid.Rebind();    //This prevents clicking Refresh Data from working.  
    }  
 
    protected void GridTableHierarchySetEditability(GridTableView view, bool editAllowed)  
    {  
        Trace.Write("Event", this.ToString() + ": " + "GridTableHierarchySetEditability");  
        //Recursively set editability for this table view and all its children.  
        //Unnecessary since we hide command buttons, but this is further protection.  
        view.AllowAutomaticInserts = editAllowed;  
        view.AllowAutomaticDeletes = editAllowed;  
        view.AllowAutomaticUpdates = editAllowed;  
 
        //Show or hide command columns (generally edit or delete)  
        foreach (GridColumn col in view.Columns)  
        {  
            if (col.ColumnType == "GridEditCommandColumn" || col.ColumnType == "GridButtonColumn")  
            {  
                col.Visible = editAllowed;  
            }  
        }  
 
        //Process any child tables  
        foreach (GridTableView child in view.DetailTables)  
        {  
            this.GridTableHierarchySetEditability(child, editAllowed);  
        }  
    }  
 
<BR> 

 


 

 

Paul
Top achievements
Rank 1
 answered on 13 May 2010
1 answer
126 views
I just downloaded RadEditor and the documentation on the download page as well as in the downloaded archive does not seem to be working for me.  It opens up and I see the table of contents to the left, but the right panel just says "Navigation Cancelled".  I have tried on multiple computers.

I am trying to see if this will work with MOSS 2010.  It sounds like a very cool utility.
Stanimir
Telerik team
 answered on 13 May 2010
1 answer
212 views
Hello, I have a bit of an interesting question:

For my application I need to implement a very stripped down version of the table editor. Just the ability to do the following:

  • Set columns and rows.
  • Optionally denote the top row as a "header".
  • Optionally denote the bottom row as a "footer".

Would it be possible for someone to point me in the right direction on where to start doing this or a successful strategy for getting it done?

One option that occurred to me was to create my own dialog and custom button that gives this functionality and then injects the table structure into the content area - but would this allow the user to modify the table? Would I have to add javascript events into the content area to enable things like handles for dragging column widths or adding new rows?

Really, I guess I am just polling for some potential strategies to sift through before I get started on what could potentially be quite a bit of work.

Thanks in advance

John
Rumen
Telerik team
 answered on 13 May 2010
1 answer
203 views
I have a RadEditor as a user control opening in a RadWindow. I have a custom dialog which is an ImageManager called from a button on the RadEditor. So far so good. The dialog opens when you click my button, and closes when you click Insert or Cancel.

But I can't get anything to happen on Insert. I'm looking at all sorts of examples and it appears that ClientCallbackFunction is what I should be focusing on. I've tried putting the JS function on the page called in the RadWindow, in the user control, and also registering it in the user control's script. All I'm trying to get it to do is alert something when the dialog closes, but nothing happens at all.

if (HasBackgroundImage) 
                    { 
                        string script = @"
                        <script language ='javascript'>
                        function OnClientLoad(editor)
                        {
                                var style = editor.get_contentArea().style; 
                                style.backgroundImage = 'url(/UserImages/backgrounds/" + strBgImg + @")'; 
                                style.backgroundRepeat = 'no-repeat';
                                style.backgroundPosition = 'top right';
                        }
                        function BackgroundManagerFunction(sender, args)   
                        {   
                             alert('OK');
                             
                        }  
                        </script>"; 
                        Page.ClientScript.RegisterClientScriptBlock(GetType(), "CommentScript", script, false); 
                        RadEditor1.OnClientLoad = "OnClientLoad"; 
                    } 
The first bit of registered JS works fine. It loads the BG image on client load.

Here's the code for my custom dialog:
if (HasBackgroundImage) 
                    { 
                        // Custom image manager 
                        Telerik.Web.UI.Editor.DialogControls.FileManagerDialogParameters backgroundFileManagerParameters = new Telerik.Web.UI.Editor.DialogControls.FileManagerDialogParameters(); 
                        backgroundFileManagerParameters.ViewPaths = new string[] { "~/UserImages/Backgrounds/" }; 
                        backgroundFileManagerParameters.UploadPaths = new string[] { "" }; 
                        backgroundFileManagerParameters.DeletePaths = new string[] { "" }; 
                        backgroundFileManagerParameters.MaxUploadFileSize = 5000000;                       
                        // If you don't set the following property, the default value will be used 
                        //backgroundFileManagerParameters.SearchPatterns = new string[] { "*.jpg,*.gif,*.png" }; 
                        DialogDefinition backgroundImageManagerDialog = new DialogDefinition(typeof(Telerik.Web.UI.Editor.DialogControls.ImageManagerDialog), backgroundFileManagerParameters); 
                        backgroundImageManagerDialog.ClientCallbackFunction = "BackgroundManagerFunction"; 
                        backgroundImageManagerDialog.Width = Unit.Pixel(680); 
                        backgroundImageManagerDialog.Height = Unit.Pixel(420); 
                        //If you need to customize the dialog then register the external dialog files 
                        //backgroundImageManagerDialog.Parameters["ExternalDialogsPath"] = "~/AdminEditorDialogs/"; 
                        RadEditor1.DialogOpener.DialogDefinitions.Add("backgroundImageManager", backgroundImageManagerDialog); 
                    } 
That code works fine too. My dialog exists and opens as expected.

Here's my code for RadEditor1 and the rest of the stuff on my page:
<asp:Panel ID="pnlTitle" runat="server" DefaultButton="btnUpdateTitle" > 
    <b>Title:</b>  
    <asp:TextBox ID="txtTitle" runat="server" CssClass="textBox" Width="560px"></asp:TextBox>  
    <asp:Button id="btnUpdateTitle" runat="server" CssClass="button" Text="Update Title" CausesValidation="false" OnClientClick="UpdateTitle(); return false;" /> 
    <br /> 
</asp:Panel> 
<asp:Panel ID="pnlSubTitle" runat="server" DefaultButton="btnUpdateSubTitle"> 
    <b>Sub-Title:</b> 
    <asp:TextBox ID="txtSubTitle" runat="server" CssClass="textBox" Width="560px"></asp:TextBox>  
    <asp:Button id="btnUpdateSubTitle" runat="server" CssClass="button" Text="Update Sub-Title" CausesValidation="false" OnClientClick="UpdateSubTitle(); return false;" /> 
</asp:Panel> 
<telerik:RadEditor runat="server" ID="RadEditor1" ExternalDialogsPath="~/AdminEditorDialogs"  
AutoResizeHeight="false" EnableResize="false"> 
<ImageManager ViewPaths="~/UserImages" UploadPaths="~/UserImages" /> 
<Content> 
</Content> 
</telerik:RadEditor> 
<script type="text/javascript"> 
    Telerik.Web.UI.Editor.CommandList["BackgroundImage"] = function(commandName, editor, args) 
    { 
      editor.showDialog("backgroundImageManager"); 
    }; 
</script>  


When I choose a file from the backgroundImageManagerDialog and click "Insert" there's no alert. The dialog closes.

I've also tried doing something other than alert, as in changing the value of a text box on the page. That doesn't happen either.

I get no JS errors. In fact, when I was first setting this up, I had the ClientCallbackFunction set to a function that didn't exist and didn't get any errors.

What am I missing?


Dobromir
Telerik team
 answered on 13 May 2010
9 answers
228 views

I am experiencing some inconsistent behavior with the New Paragraph feature on the Editor.

I did all my tests on your example at: http://www.telerik.com/DEMOS/ASPNET/Prometheus/Editor/Examples/Default/DefaultCS.aspx

On IE:
The ENTER key actually generates a  br  tag.
The button labeled New Paragraph creates a new p tag and places a space in it but places the cursor after the paragraph so if you start typing straight away the words you type are placed outside it and after it, as such:

<p>This is a paragraph</p> 
<p>&nbsp;</p>My new paragraph by clicking on the New Paragraph button 

This happens only if the cursor was placed at the last paragraph in the editor content before the button was clicked.

If another paragraph already exists after the one that the cursor is currently placed and you click on the New Paragraph button a new p tag is correctly added before the next paragraph but the cursor is placed at the beginning of the next one. If you start typing the content is placed on that paragraph leaving the new one in between untouched. There is no way to write in the new one unless you switch to the html view and add some content to the new paragraph in order to make it visible in the edit mode.

On FF:
The ENTER key actually generates a p tag.
The button labeled New Paragraph does absolutely nothing. 

Rumen
Telerik team
 answered on 13 May 2010
1 answer
73 views
Hi,

I'm running into problems when Tooltipifying a RadGrid.

Firstly I have a load on demand RadTreeView - when the user clicks on a node I populate the RadGrid.  That all works fine but I needed to have an asp:UpdatePanel around these in order to prevent a complete postback when a new node is clicked.

I then moved on to Tooltipifying the grid - I was getting some wierd results on mouseovering a row - basically it was doing a full postback and not showing the tooltip properly.

Removing the UpdatePanel has everything working perfectly except that clicking on a different node in the TreeView results in a full postback which I want to avoid.

Anyone got any ideas?

Thanks in advance,

Kirk
Kirk Potter
Top achievements
Rank 1
 answered on 13 May 2010
6 answers
126 views
Hello,
I am using Rad Editor (RadControls for ASP.NET AJAX Q3 2009) for long time and now the requirement is to enable spell check. I do not have any knowledge on how this spell check works and started reading articles related to rad spell in telerik site. 

In my code I clear all the tool bars and add very few one what ever we need. Below are the steps I followed.

1. Added below code and I check see the button for spell check.
void AddSpellCheckerButton() 
        { 
            Telerik.WebControls.RadEditorUtils.ToolbarButton spellCheckButton = new Telerik.WebControls.RadEditorUtils.ToolbarButton( SpellCheckerCommandName ); 
            spellCheckButton.ShowIcon = true; 
            ValueEditor.Toolbars[ MainToolBarName ].Tools.Add( spellCheckButton ); 
        } 

2. Added Spell folder which has RadSpell.js, SpellCheckService.js and SpellDialog.js to the _RadControls folder in solution. 
3. When I click on spell check Icon, I get below error message.
 "HTTP 404. The resource you are looking for could have been removed, had its name changed, or its temporariry unavailable. 
Requested Url: /_RadControld/Spell/Telerik.Spell.DialogHandler.aspx"

Questions
1. Is this a right way of doing it or not?
2. Do I need to use rad spell and assign rad editor control id? If that's the case how can I make my editor button click call the rad spell?

Any help in this is highly appreciated.

Venki

Venki
Top achievements
Rank 1
 answered on 13 May 2010
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?