Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
148 views
After the upgrade to radControls AJAX ASP.Net Q2 2009,  a RadSplitter I'd been using does not resize the adjacent panel when a sliding pane is expanded. Instead the pane expands but underneath the adjacent panel. I tried using the suggestion posted here but to no avail..

http://www.telerik.com/community/forums/aspnet/splitter/sliding-pane-problem.aspx


This problem seems to only happen with IE, firefox the behavior still works as expected. Aside from the above link, is there any other way to address this issue...?

The splitter has two panes, with a splitter bar in the middle of them. The left pane has sliding panes with menu items, when sliding out, they now go under the right pane (adjacent pane).

Thanks
Tsvetie
Telerik team
 answered on 21 Oct 2009
1 answer
274 views
Hi,

I'm struggling with developing a page which has dynamic TabStrip and MultiPage. When a button is clicked a new tab and pageView should be created and selected. The main challenge for me is to make it happen on client side so that the whole page does not refresh. A've already checked the LoadOnDemand demo, but my case is bit different, as I'm instanciating tabs and pageviews dynamicly.

What is the approach that you guys follow to resolve such a problem?

So far I managed to do the following:
1) when button clicked create a tab on client side and send an ajax request to server to create a tab item and pageview on the server side:
var tab = new Telerik.Web.UI.RadTab();  
tabStrip.get_tabs().add(tab);  
tab.set_text(menuName);  
tab.select();
 
var ajaxManager = $find('<%= RadAjaxManager1.ClientID %>');  
ajaxManager.ajaxRequest("ActivateTab," + menuName);  

2) In ajax handler:
RadTabtab = new RadTab();  
tab.Text = args[1];  
RadTabStrip1.Tabs.Add(tab);  
 
RadPageView pageView = new RadPageView();  
pageView.ID = args[1];  
rmp.PageViews.Add(pageView);  
tab.PageViewID = pageView.ID; 

3) Hooked up to tab selecting handlers:
<telerik:RadTabStrip .... OnClientTabSelecting="OnMainTabSelecting" OnTabClick="RadTabStrip1_TabClick" > 
canceling the postback if pageview is already attached to tab.
        function OnMainTabSelecting(sender, args) {  
            if (args.get_tab().get_pageViewID()) {  
                args.get_tab().set_postBack(false);  
            }  
        } 
TabClick server handler:
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)  
    {  
    } 

4) Loading control for pageView
    protected void rmp_PageViewCreated(object sender, RadMultiPageEventArgs e)  
    {  
            string userControlName = getUserControl(e.PageView.ID);  
            Control userControl = Page.LoadControl(userControlName);  
            e.PageView.Controls.Add(userControl);  
    } 

This partially works. My main concern is that when creating a tab, it does not load the content of the pageView(I need to click on the tab load page content). Another minor issue is then I create tabs fast enough and select one of them, some of the previously created tabs disapper. Most probably the ajax request is being sent in the middle of receiveing previous postback, and some of tab creating requests are missed.

So, please help me to fix those issues. I need to make the page completely dynamic.

Thanks in advance,
Ruben.

P.S. I also tried to manipulate with PageViews in javascript, creating them on the client side and adding to multipage.get_pageViews() and multipage.get_pageViewData() arrays, and loading user control contents using WebMethods and HTTPContext.Current.Server.Execute(...) methods. It works for very simple usercontrols that have no ajaxmanagers. The ones that have some complicated controls are failing in Server.Execute methods. I'm open to any kind of solution.





Yana
Telerik team
 answered on 21 Oct 2009
2 answers
122 views
I have tried the example for starting spell check from javascript but it is not working for me.  The spell check windows opens and then immediately closes.  If I set buttonType="PushButton" and then click on the spell check button the spell check works as desired.

I used a good Telerik sample but cannot find the exact reference that I used but the link below is basically what I used
http://www.telerik.com/help/aspnet-ajax/spell_howtolaunching.html

Below is a non working sample.  I am using Telerik version 2009.2.826.35

Any help is greatly appreciated.

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="QuestionNote.aspx.vb" Inherits="QuestionNote" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>Question Note</title> 
</head> 
<body> 
 
    <script type="text/javascript">  
        function spellCheck()  
        {  
            var spell = $find("<%= RadSpell1.ClientID %>");  
            spell.startSpellCheck();  
        }  
 
        function checkFinished (sender, args)  
        {  
            args.suppressCompleteMessage = true;  
            alert('finished');  
        }  
    </script> 
 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <table width='100%' cellpadding='2'>  
        <tr> 
            <td> 
                <asp:TextBox ID="tbxNote" runat="server" Width="100%" Height="100" TextMode="MultiLine" Text='asdf' 
                    Rows="4"></asp:TextBox> 
                <br> 
            </td> 
        </tr> 
        <tr> 
            <td align='center'>  
                <input type="submit" name="Save" value="Save" class="ButtonNormal" onclick="return spellCheck()" /> 
                <asp:Button ID="btnCancel" runat="server" CssClass="ButtonNormal" Text="Cancel" /> 
            </td> 
        </tr> 
    </table> 
    <input id="control" type="hidden" name="control" runat="server">  
    <telerik:RadSpell ID="RadSpell1" runat="server" 
        ButtonType="None" ControlToCheck="tbxNote" OnClientCheckFinished="checkFinished" /> 
    </form> 
</body> 
</html> 
 

 

 

 

 

 

 

 

 

 

Joel R
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
172 views
I am using VS 2008 and Rad AJAX Controls 2009.2.826.35. I put a RadEditor on the page and enabled dialgos and spell check. However I still get the error message that says dialogs are not enabled when trying insert a hyperlink or image or anything. The page loads and the editor works except for the dialogs. I have used the RadEditor many times before without issues, until now. Here is the handlers section of the web.config.

    <httpHandlers> 
      <remove verb="*" path="*.asmx" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" /> 
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" /> 
    </httpHandlers> 
 

What am I doing wrong here?

Thanks,
Tim

Rumen
Telerik team
 answered on 21 Oct 2009
1 answer
93 views
hi,
I have used auto complete control from ajax control toolkit to auto complete my text boxes' texts in a rad dock control,
but unfortunately when the control's list is opened it is behind the next rad dock. what can I do to see the auto complete list above the rad dock?
Pero
Telerik team
 answered on 21 Oct 2009
1 answer
131 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
158 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
100 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
303 views
Can we open & edit word document inside a web page.
Paul
Telerik team
 answered on 21 Oct 2009
3 answers
154 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?