Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
142 views
How do I set the default location for upload files on the client machine so that when the user clicks the upload button and then the select button of the upload control that it defaults to a specified location on the users hard drive?
Fiko
Telerik team
 answered on 21 Oct 2009
2 answers
166 views
Hi! I have a RadEditor and customized its control tools, but the vertical scrollbar doesn't show in the text area.

Here's the markup:

<telerik:RadEditor ID="EdtDesc" runat="server" EditModes="Design" OnClientLoad="LimitCharacters"
                                    OnClientPasteHtml="OnClientPasteHtml" >
                                    <Languages>
                                        <telerik:SpellCheckerLanguage Code="en-US" Title="English" />
                                    </Languages>
                                    <Tools>
                                        <telerik:EditorToolGroup>
                                            <telerik:EditorTool Name="Undo" />
                                            <telerik:EditorTool Name="Redo" />
                                            <telerik:EditorSeparator Visible="true" />
                                            <telerik:EditorTool Name="Bold" />
                                            <telerik:EditorTool Name="Italic" />
                                            <telerik:EditorTool Name="Underline" />
                                            <telerik:EditorSeparator Visible="true" />
                                            <telerik:EditorTool Name="JustifyLeft" />
                                            <telerik:EditorTool Name="JustifyCenter" />
                                            <telerik:EditorTool Name="JustifyRight" />
                                            <telerik:EditorTool Name="JustifyFull" />
                                            <telerik:EditorSeparator Visible="true" />
                                            <telerik:EditorTool Name="AjaxSpellCheck" />
                                        </telerik:EditorToolGroup>
                                    </Tools>
                                    <Modules>
                                        <telerik:EditorModule Name="RadEditorStatistics" />
                                    </Modules>
                                </telerik:RadEditor>

<script type="text/javascript">
        var editorList = new Object();
        var editorLengthArray = [4000, 30];
        var counter = 0;

        function isAlphaNumericKey(keyCode) {
            if ((keyCode > 47 && keyCode < 58) || (keyCode > 64 && keyCode < 91)) {
                return true;
            }
            return false;
        }

        function LimitCharacters(editor) {
            editorList[editor.get_id()] = editorLengthArray[counter];
            counter++;

            editor.attachEventHandler("onkeydown", function(e) {
                e = (e == null) ? window.event : e;
                if (isAlphaNumericKey(e.keyCode)) {
                    var maxTextLength = editorList[editor.get_id()];

                    textLength = editor.get_text().length;
                    if (textLength >= maxTextLength) {
                        alert('You are not able to type more than ' + maxTextLength + ' symbols!');

                        e.returnValue = false;
                    }
                }
            });

            var element = document.all ? editor.get_document().body : editor.get_document();
            $telerik.addExternalHandler(element, "paste", function(e) {
                e = (e == null) ? window.event : e;

                var maxTextLength = editorList[editor.get_id()];
                textLength = editor.get_text().length;

                var clipboardLength = window.clipboardData.getData("Text").length;
                textLength += clipboardLength;
                if (textLength >= maxTextLength) {
                    alert('You are not able to type more than ' + maxTextLength + ' symbols!');
                    e.returnValue = false;
                    return false;

                }
            });
        }

        function CalculateLength(editor, value) {
            var textLength = editor.get_text().length;
            var clipboardLength = value.length;
            textLength += clipboardLength;
            return textLength;
        }

        function OnClientPasteHtml(editor, args) {
            var maxTextLength = editorList[editor.get_id()];
            var commandName = args.get_commandName();
            var value = args.get_value();

            if (commandName == "PasteFromWord"
                || commandName == "PasteFromWordNoFontsNoSizes"
                || commandName == "PastePlainText"
                || commandName == "PasteAsHtml"
                || commandName == "Paste") {
                var textLength = CalculateLength(editor, value);
                if (textLength >= maxTextLength) {
                    alert('You are not able to type more than ' + maxTextLength + ' symbols!');
                    args.set_cancel(true);

                }
            }
        }     

    </script>



Hope to find a solution.

Many Thanks!
reynald lawrence
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
107 views
Hi,

I have a RadComboBox in my MasterPage to search the entire site.

All underlying pages using this MasterPage are using OutputCache. With this configuration it is possible to search one time but after that the combobox is cached and no items is being displayed, no postback, nothing.

I have tried using the same method as:
 - Use RadMenu in a user control with OutputCache enabled
and
- Disabling embedded resources

But the result is that the RadComboBox is dead, It does not change state from "EmptyMessage" to a "SearchString".

I have the latest javascripts (2009.02.0701.35) and the following code in my MasterPage:
<asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="RadControls/Scripts/Common/Core.js" />
            <asp:ScriptReference Path="RadControls/Scripts/Common/Animation/AnimationScripts.js" />
            <asp:ScriptReference Path="RadControls/Scripts/Common/Navigation/NavigationScripts.js" />
            <asp:ScriptReference Path="RadControls/Scripts/Common/Popup/PopupScripts.js" />
            <asp:ScriptReference Path="RadControls/Scripts/Common/Scrolling/ScrollingScripts.js" />
            <asp:ScriptReference Path="RadControls/Scripts/ComboBox/RadComboBoxScripts.js" />            
        </Scripts>
</asp:ScriptManager>

What have I done wrong? Is there an easier approach?

Best Regards,
Andreas
Veselin Vasilev
Telerik team
 answered on 21 Oct 2009
1 answer
313 views
Can we open & edit word document inside a web page.
Paul
Telerik team
 answered on 21 Oct 2009
3 answers
159 views
Hi,

I want to allow only specific file types to be uploaded using File Explorer.  I tried by changing SearchPatterns option but It still can upload all the file types.  Is there any other settings we can change for this?

Thank you


Fiko
Telerik team
 answered on 21 Oct 2009
2 answers
62 views
I downloaded the 2009.2.1007 hotfix to fix the issue of RadEditor.get_html() outputting body tags (with contentEditable=true).  This bug renders my app useless, so the hotfix is necessary for me.

However the hotfix seems to introduce always-editable GridCheckBoxColumns, at least for auto-generated columns.  I swapped in the 2009.2.826 dll and the problem went away.

Is this a known issue?  Is it fixed?

Thanks for your help.

Chris
Chris Dalessandri
Top achievements
Rank 1
 answered on 21 Oct 2009
10 answers
205 views
Hi

I'm using the tree view to display names and on clickin the name I'm able to load that persons data into a form. The top level node is the group the person belongs to. This is all driven from code behind with the data coming from a class.

This is my load code to populate the tree.

.DataValueField = 1

.DataSource = dt

.DataFieldID =

"ID"

 

 

 

.DataFieldParentID = "ParentID"

 

 

 

.DataTextField = "Node"

 

 

 

.DataValueField = "ChildID"

 

 

 

.DataBind()

 

 


What I'd like to do now is add an image to the person name - this is the secon level node, and have that fire a separate event, so not to load the paersons details into a form, but rather load their data into a report.

How can I add this image just to the persons name node and fire 2 separate routines.

Andy
Andy Green
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
104 views


In the online documentation for the OnClientItemClicking event http://www.telerik.com/help/aspnet-ajax/panel_panelbar_onclientitemclicking.html there is the following javascript:

<script>  
function OnClientItemClicking(sender, args)  
{  
   var item = eventArgs.get_item();  
   var navigateUrl = item.get_navigateUrl();  
   if (navigateUrl && navigateUrl != "#")  
   {  
      var proceed = confirm("Navigate to "+ navigateUrl + " ?");  
      if (!proceed)  
      {  
         eventArgs.set_cancel(true);  
      }  
      else 
      {  
         eventArgs.set_cancel(false);  
      }  
}  
</script> 

You will notice that the variables for the function are "sender" and "args" but everything inside the function uses "eventArgs" instead of "args". This has me going in circles for a while.

Regards,
Konrad
Paul
Telerik team
 answered on 21 Oct 2009
2 answers
81 views
I am having an issue with the Image Manager inside of the Editor.  When I click on the Image Manager icon and the Image Manager window opens, it actually opens behind my RadMenu.  You can grab and move the Image Manager window, but automatically it opens with the top part behind the menu.  The Document Manager also does the same thing.

Any ideas?
Svetlina Anati
Telerik team
 answered on 21 Oct 2009
1 answer
51 views
Hi!

Are there any special considerations to take into account when you dynamically create a structure where you put Docks inside DockZones that in turn are children of Docks inside DockZone? Do you see what I mean?
Pero
Telerik team
 answered on 21 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?