Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
I have a listview that is forced itno insert mode using ListView1.ShowInsertItem().
Where and how do I access the controls inside the InsertItemTemplate server side (I need to change some properties of the controls)?

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 15 Jun 2013
7 answers
232 views
We have a Telerik upload control on a Website running under Framework 4.0 that brings the file into a folder on the file server. This functionality is working when ran from Internet Explorer v8.0.7600.16385 from a Windows 7 PC. When I use a TEST PC that is running Internet Explorer v8.0.6001.18702 on Windows XP, large files (the one I am testing is 136 MB) that worked on the Windows 7 PC are not uploading. The behavior is that the status bar just indefinitely appears to be loading and it just hangs there.

To throw something else odd into the works, Firefox 3.6.8 is able to upload the large file just fine from the XP machine.

I have the following lines coded in the Web.config, and this is allowing larger files to work for our Windows 7 machines.


<httpRuntime maxRequestLength="209715200" enable="true" useFullyQualifiedRedirectUrl="true" executionTimeout="3600" />
  
...
  
  
<requestLimits maxAllowedContentLength="209715200"/>


Any ideas what is happening? By the way I am using version 2011.1.315.40 of Telerik but we experienced the same behavior under the last version of Telerik as well.
Scott
Top achievements
Rank 1
 answered on 14 Jun 2013
1 answer
386 views
I have a ComboBox on my page which is using autocomplete and load on demand to search through a database table containing 50,000 names:

<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel2">
  
   <telerik:RadComboBox ID="RadComboBox2" runat="server"
                    Width="300" Height="300" Label="Select people:" EmptyMessage="Type a persons name"
                    AllowCustomText="true" MarkFirstMatch="True"
                    DataSourceID="SqlDataSource2" DataTextField="Name"
                    DataValueField="Name" Filter="Contains"
                    EnableAutomaticLoadOnDemand="True" EnableVirtualScrolling="true" ItemsPerRequest="15"
    />
 
</telerik:RadAjaxPanel>

This works fine if I want to select one item however I would like the user to be able to select multiple items, E.g. the user searches for John and is able to select several people called John. It doesn't need to retain the selected items between multiple searches.

If I add in a Checkboxes="True" attribute, the control starts acting strangely. The textbox keeps clearing as I type and the selected items are cleared when I try to post back the page. Is there a way to make this work?
msigman
Top achievements
Rank 2
 answered on 14 Jun 2013
2 answers
36 views
I have an editable RadGrid within a RadAjaxPanel that utilizes modal popups and form templates for editing.

When users try to insert a row and push enter, a second modal will come up for editing a row: Screenshot

We don't want to support users pressing enter to submit the modal anyway (they should just click the save button), so I'm trying to prevent the postback being caused by the enter key being pressed using javascript:

<ClientSettings AllowKeyboardNavigation="False">
     <ClientEvents OnKeyPress="BlockEnterKey"  />     
     <KeyboardNavigationSettings AllowSubmitOnEnter="false" />
</ClientSettings>

<script type="text/javascript">
  function BlockEnterKey(sender, e) {
    if (e.get_keyCode() == 13) {
      alert('Blocking Enter KeyPress');
      e.set_cancel(true);
      e.cancelBubble = true;
      return false;
    }
  }
</script>

Unfortunately this seems to have absolutely no effect (other than that alert I put in there to make sure it's running).

Any idea as to why I'm unable to block this keypress event?
Luke
Top achievements
Rank 2
 answered on 14 Jun 2013
1 answer
80 views
Hello, 

I have a radRotator.
Rotator type is "AutomaticAdvance" and ScrollDirection is "Left".
PauseOnMouseOver is "true" (mandatory)

If I move the mouse cursor along with the item scrolling direction before scrolling is not completed
it stopped at inappropiate position and continue scrolling with that position.
Same thing happen at following demo website.
http://demos.telerik.com/aspnet-ajax/rotator/examples/overview/defaultcs.aspx
I attached the screen capture of RadRotator with above demo.

Please check and let me know how can I solve this problem?

Thanks in advanced
Slav
Telerik team
 answered on 14 Jun 2013
2 answers
300 views
Hi,

 I have successfully linked to the local CDN for the Scripts, but I'm having trouble trying to link to a local CDN for the Skin files. 

I'm trying to get away from the WebResource.axd and ScriptResource.axd links, because for some of my clients, it gets caught up in their intrusion detection software as bad data, and gets blocked.

in the Web.Config 
<add key="Telerik.Skin" value="Office2010Blue" />
 
<add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" />
<add key="Telerik.StyleSheetManager.TelerikCdn.BaseUrl" value="http://www.abc.com/Skins" />
<add key="Telerik.StyleSheetManager.TelerikCdn.BaseSecureUrl" value="https://www.abc.com/Skins" />
 
<add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" />
<add key="Telerik.ScriptManager.TelerikCdn.BaseUrl" value="http://www.abc.com/Scripts" />
<add key="Telerik.ScriptManager.TelerikCdn.BaseSecureUrl" value="https://www.abc.com/Scripts" />

And here is the first part of the Aspx Master File; notice the RadScriptManager and RadFormDecorator
<%@ Master Language="VB" CodeFile="MasterABC.master.vb" Inherits="MasterABC" %>
<!DOCTYPE html>
    <head runat="server">
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
        <title> ABC, Inc. </title>
        <link href="~/Styles/ABC/Site.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript">
            window.history.forward(1);       
        </script>
        <style type="text/css">
            .RadMenu .rmLink .rmText
            {
            font-family: Arial;
            font-size: 12pt !important;
            }
        </style>
    </head>
    <body id="mainBody" runat="server">
        <script type="text/javascript"> var flag = false;</script>
        <script type="text/javascript">
            var AjaxIsActive = false;
             
            function RequestSent() {
                if (!AjaxIsActive) {
                    AjaxIsActive = true;
                }
                else {
                    alert('Wait for Page to Load');
                    return false;
                }
            }
             
            function ResponseEnd() {
                AjaxIsActive = false;
            }
        </script>
         
        <form id="form1" runat="server">
            <center>
                <div>
                    <telerik:RadScriptManager ID="ScriptManager1" runat="server">
                    </telerik:RadScriptManager>
                    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2010Blue" EnableRoundedCorners="true" />
                    <table id="header" runat="server">
                        <tr>
                            <td align="left" style="width:300px">
                                <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                            </td>
                            <td valign="bottom" align="right">
                                <asp:Label ID="FN" runat="server" Font-Size="X-Large"></asp:Label> <br/>
                                <asp:Label ID="MN" runat="server" Font-Size="X-Large"></asp:Label
                                <table>
                                    <tr>
                                        <td style="text-align:left">
                                            <telerik:RadMenu ID="Menu1" Skin="Office2010Blue" Runat="server" EnableRoundedCorners="true">
                                            </telerik:RadMenu>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>

For the Script includes, I get nice Script requests in the raw HTML (Partial example)
<script src="https://www.abc.com/Scripts/ajaxz/2012.2.912/Common/Core.js" type="text/javascript"></script>
<script src="https://www.abc.com/Scripts/ajaxz/2012.2.912/FormDecorator/RadFormDecorator.js" type="text/javascript"></script>
<script src="https://www.abc.com/Scripts/ajaxz/2012.2.912/Common/jQuery.js" type="text/javascript"></script>


BUT, for some reason, I still get this request still with the <link href="WebResource.axd...; I'm assuming it is the RadFormDecorator call to the skin css and images:
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 190405
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-UA-Compatible: IE=7
Date: Wed, 12 Jun 2013 02:27:44 GMT
 
 
<!DOCTYPE html>
    <head>
    <style type="text/css">
        .style2
        {
        text-decoration: underline;
        font-size: x-large;
        font-family: "Century Gothic";
        }
        .style3
        {
        font-size: x-small;
        }
    </style>
    <style id="head_Style1" type="text/css"> .radupload { float: left; margin-bottom:20px; }
        .bigModule { clear: both; }
        .smallModule { margin-bottom:20px; }
        #controlContainer { vertical-align: top; padding: 20px 10px; }
        .ruProgressArea { position: absolute; top: 0; left: 10px; }
        input.RadUploadSubmit { margin-top: 20px; } </style>
<title>
     ABC, Inc.
</title><link href="../Styles/ABC/Site.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
            window.history.forward(1);       
        </script>
        <style type="text/css">
            .RadMenu .rmLink .rmText
            {
            font-family: Arial;
            font-size: 12pt !important;
            }
        </style>
    <link href="/WebResource.axd?d=7209tdxJpyfYvktO7sizLvEsOlAAECN6K3FRNE-PHZRYrWNeNFtBXQbsuC66ijzjVL0YeGYekDhirFbodcA8dpuxgxZPT8bwHQHFPZyOQ2iqctHlDW0PZsNDzijuaY-F9SFdS25jptZEXW79Bmhleg2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=oq7JFUamAGDDod2zl0bRxmoJJl3MRXXYu9kGCqiBtsYNl3E2SE-cNLPrh4Z52YMLXfCf6vb6jowUyroohPh9BcVgQsAAgkdFkphvW5mXNHdKHmzeS4ffBCFyHl1muhvxTjqqvj750FHAPhzOWP4p_8LUIeOfUEB2GwzsiGGEDo7yk5A1tAra8OZ37McbfvMZJqpBeNa1eY4zZkAT-bWnkw2&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=yy_i9ieMBzMnZQru3Pdp-zv5fihc_8qUAWmz-JfbtmatlOKdAdpVPAYNUt3O-d6QdSEuR2_ahVoERJg0K9jaDYRAnYSzqZWRV7fcIxOkJzDVE5Qsac_WdE5bw9-deq7jEYIR0qvVMitLCOowjXNTEg2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=VtOfGwNPga3C32XTXimW7I0iuwKw7q6nlUWQzFSZvIkA3nloS3c_wY6se-UcEMduObX2VkCty-gbAvvT_chGRo4JaWsE88soNMM-YUGkYzt1_afGccaeDqGdAmiBvWdDsOvvF33hxOE4iX-mwIeEreQKhCx99kTcpluI-o0ZOIZePR_wuFI7bPQfM_opYTHJ0&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=VcxTCfx6wBSYwXw0sOU10ZoD0BU8xX4nQNF3GOxhH4nyqNQt7WniM-nOhpQoxW9vTYsynZPKzhcTCTZeUme-ha2rHAS-AkT_PjCd1jIWd-53Tq7ZNtOAaI6i_pj0GcVIUx2yBb6eF3k4Tqp4ovTYhA2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=ZMrtlghAh8mu8vLQWv-nO0H8hkPsZQwoKKob-VFVGUB10sHtNv6dGANGwRNh7UaoJdM_QL3rqhAT-P46VJ4SJFRhFScY0IzytWrUB3rGnCMT76L6sIPKFG_xlf_blMjge8cHLiWA7P6K9x24YUMoHL38fQuancEYYsebGUUf7Du_5fKPuUAKqZnrr4pOMTAL0&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=ZJhKpdZwpS108KbGM0H2TZF_EWXJ4ECWG1Em-Y-GDt1JRcBLtb_n2Nkb13OOqzL9ixP_bbA93c6CEug8ADqXsal460faur731RPCxOe64pag9YDtLe1flnIHrE2s1TXU8GvrT6WljonOhkC9MBq11Q2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=6ON68SCi2xXHwqc4l3uDtRUR00KLUtKpyL_08eHIsXtKlSbYpsiMe_fi33NHzkpPSrlSlFoCSH4gM40PHWmJoE6_xmqvfILfF0NpAhPAIq2fKYoqSO6ffH0KkQGDHXuSE5onleMaL_95WcUX0XPAitYQREHLVOg7YCoVIgyaFGwazHIZuC-lCRdnVt6rcQq5vbs4Rl7UKFA7ULhmYqwJ_g2&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=GdWx2IEl9qeAVSBk_wNbtNNfEEr0RDfJhzZbTLHshjF4JMq2C4mKXlIz0U2SD09ysHUnonI6eVFFELGv-AolOh_uMtQoKflJ5dBVi-wNg1X66ES6cZLnUe_3rhQGsvuwtjwQcKNc2vWsf-cEPAVvQQ2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=QfqpEg8bjesXMy-Al9qTqzOqfrDgRid_4ywST7dqgWdhsfB5o1itTDWVLGQVdSmniXGMswew3hXDtq5VwkYPIn76ozSw62N0L6UY2qY3t-kvi3R92WRDVLIcKf_M-BOisSVuQdtZ93YgAwJRkAiwaFt_Jq6_ueopk3mjmGXaMGguF6mUi7gCKJSUkDXp4Cw-0&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=sXVgqmZA3Vi0qJFOU8bZCafGsK-iAaxh4R2-tqOSGWTirEMClpnJj4__rOPTYn_P5iel6KpdYdI6B3cpXFv-XvpJgqbdC8RtGtOGnTY8KyhZCefwANsIULOxvwcmRjSgeOShII4cMgi0U27lUKjLHg2&t=635064967590027882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=s0JUHkkrBHaA8138SQ5FzmmohQq9va8KLWcjWENuWi2H2b0ojbgGxC-LT2OL9XlKiNR3kSFY7A95TAUSaXQcr0utOQJHhD4pLFF7CqwBTBp3opqxAGBXVSOygHtRu04DqteLyX34bwtUwQDYb16nvvw4CZgDKsmedNEnp3CmKCiLHJOqVVKdSzWH2-gUny9K0&t=635064967433091882" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /></head>
    <body id="mainBody" bgcolor="f2dd95" style="background-image: url(/Decoration/2/BG1.png)">

I've spent quite a bit of time reading the forums, and experimenting, without success. Any ideas or suggestions would be GREATLY appreciated!

Thanks in advance!

-Chuck
Danail Vasilev
Telerik team
 answered on 14 Jun 2013
2 answers
235 views
Hello,

I am getting a JavaScript error when I call my javascript function from the OnClientDropDownClosed client-side event from the RadComboBox control.

The error I get is the following:

JavaScript critical error in (unknown source location)

SCRIPT1009: Expected '}'

My javascript is the following

<script type="text/javascript">
    function displaySelectedValues() {
        debugger;
        var combo = $find("<%# RadComboBox1.ClientID %>");
 
        alert(combo.get_checkedItems().length);
        //for (var i = 0; i < dropdown.get_checkedItems().length; i++) {
 
        //    var text = dropdown.get_items().get_text();
        //    label.value = label.value + text;
        //}
 
 
    }
</script>

I use <%# instead of <%= because I get an error from visual studio, but regardless of which one I use I still receive the javascript error mentioned above.

The visual studio error is the following: 
    
    The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

I'm not sure if this is related to telerik or not, but if I have <%= visual studio wont even allow me to get on the page.

My markup code is as follows

<telerik:RadAjaxPanel runat="server" ID="rapConfiguration" LoadingPanelID="ralpConfiguration">
 
          <telerik:RadWindow ID="modalPopup" runat="server" Width="650px" Height="325px" Modal="true" Behaviors="Close">
 
               <ContentTemplate>
 
                   <table style="padding:10px;">
                       <tr>
                           bunch of td tags
                       </tr
                       <tr>
                           <td style="vertical-align:top;">
                                
                           </td>
                           <td style="vertical-align:top;">
                                
                           </td>
                           <td style="vertical-align:top;">
                               <asp:CheckBox id="cbElementValue" runat="server" Visible="false" Text="Check = Yes/True"/>
                               <telerik:RadCalendar ID="calElementValue" runat="server" Width="200px" RangeSelectionMode="None" EnableMultiSelect="false"></telerik:RadCalendar>
                               <asp:TextBox ID="txtBoxElementValue" runat="server"  Width="200px"></asp:TextBox>
                               <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" Visible="false" Label="Look up values:" OnClientDropDownClosed="displaySelectedValues();">
                               </telerik:RadComboBox>
 
                           </td>
                           <td style="vertical-align:top;">
                               <asp:CheckBox ID="chkExpression" runat="server" Visible="false" OnClick="checkExpression(this);"/>
                           </td>
                       </tr>
                   </table>
                     
                    
                   <div>
 
                       <asp:Label runat="server" ID="lblSelectedValues" Text="testing, one, two, three">Selected Values: </asp:Label>
                   </div>
 
                   <div class="bottomRight">
                        <asp:Button  runat="server" ID="btnSubmitValues" Text="Submit Values" OnClick="btnSubmitValues_Click" />
                   </div>
 
               </ContentTemplate>
 
            </telerik:RadWindow>
 
</telerik:RadAjaxPanel>

I tried moving the RadComboBox outside the table and I still got the error, I tried not passing in a value to the javascript function and I still got an error, because originally I was passing in "this" to the javascript function from the RadComboBox event property. Such as 

        OnClientDropDownClosed="displaySelectedValues(this);"

Do you have any advice on how I can get past this error?

After I receive the error and choose to continue through it the control still loads on the page but is unclickable, I can't open the dropdown list or type in the combobox.


msigman
Top achievements
Rank 2
 answered on 14 Jun 2013
2 answers
63 views
Hi guys,
Ultimately, I am trying to build an xml string from the checked nodes in the treeview, though I'm having issues trying to retrieve the text and value fields from checked nodes when I have the treeview control bound to a sitemapdatasource and I was hoping you could help me out.
Thanks in advance!


My code-behind looks like:
StringBuilder pagecfg = new StringBuilder();
pagecfg.AppendLine("<pageconfig>");
IList<RadTreeNode> nodeCollection = rtvSitemap.CheckedNodes;
foreach (RadTreeNode node in nodeCollection)
{
    pagecfg.AppendLine(string.Format("<page title='{0}' url='{1}' />",node.Text, node.Value));   
}
pagecfg.AppendLine("</pageconfig>");

Where the sitemap file looks like:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" enableLocalization="true">
<siteMapNode title="$resources:SiteMapLocalizations,HomePageTitle" url="~/default.aspx" description="$resources:SiteMapLocalizations,HomePageDescription" Expanded="false" />
<siteMapNode title="$resources:SiteMapLocalizations,PartSectionTitle" url="" description="$resources:SiteMapLocalizations,PartSectionDescription" Expanded="true" >
<siteMapNode title="$resources:SiteMapLocalizations,PartPageTitle" url="~/Pages/Production/ProdPart.aspx" description="$resources:SiteMapLocalizations,PartPageDescription" SecAccess="Production" />
</siteMapNode>
</siteMap>

My markup is as follows:
<telerik:RadTreeView ID="rtvSitemap" runat="server" DataSourceID="dsSiteMap" CheckBoxes="true" MultipleSelect="true" CheckChildNodes="True" DataModelID="Title" DataNavigateUrlField="Url">
                                <DataBindings><telerik:RadTreeNodeBinding Expanded="true" TextField="title" ValueField="url" /></DataBindings>
                            </telerik:RadTreeView>
Boyan Dimitrov
Telerik team
 answered on 14 Jun 2013
9 answers
365 views
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
                </telerik:RadScriptManager>
        <telerik:RadListBox ID="RadListBox1" runat="server" SelectionMode="Multiple" AutoPostBack="true">  
        <Items>  
            <telerik:RadListBoxItem Text="1" />  
            <telerik:RadListBoxItem Text="2" />  
            <telerik:RadListBoxItem Text="3" />  
             <telerik:RadListBoxItem Text="1" />  
            <telerik:RadListBoxItem Text="2" />  
            <telerik:RadListBoxItem Text="3" />  
        </Items>  
    </telerik:RadListBox>
 I used the simple page above and it's not working for me - the multi select does not seem to be working correctly (drag and release mouse type). However the examples on your website work as expected. Could you please let me know what's wrong.
Tara Diebel
Telerik team
 answered on 14 Jun 2013
3 answers
87 views
Good day all,

we're trying to use a FileExplorer in a simple context: we require that the FileExplorer be defined in an user control. This user control is included in a site page that references a master page. The master page includes a Script manager.

When accessing the page that includes the user control with the fileexplorer, however, we receive the following error:

"The control with ID 'ajaxPanel' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it."


There's no 'ajaxPanel' component both in our page nor in our code.
The component is declared as thus inside the page:
                    <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1"></telerik:RadFileExplorer>

When moving the component out from the user control into any web form using the masterpage, the fileexplorer works.
The user control references the masterpage using <%@ Reference Control="~/MasterPage.master"%>

It would seem that the radfileexplorer component is unable to dereference the scriptmanager inside the page. We've tried
RegisterWithScriptManager="false"
but this setting has no effect on the error.

So, how can we manually or dynamically assign an intended radscriptmanager to the radfileexplorer?
archimede
Top achievements
Rank 1
 answered on 14 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?