Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
87 views
Hi, I'm using 2013 Q1 SP1 controls and AjaxControlsToolKit 4.5, I have a RadComboBox and a ModalPopupExtender with a panel, In the Site.Master I'm put the ToolKitScriptManager. When I run locally the application run good! But when I publish on Azure (http://test1bam.azurewebsites.net/webform1.aspx) both controls don't work, the radcombox dont show the list of items and the panel show the content, dont show any error. I attach two images  where locally work fine, my web.config, the webform1.aspx, and the site1.master.


[WebForm1.aspx]
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="testRadControl.WebForm1" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="descripcion" DataValueField="id"></telerik:RadComboBox>
&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" Text="Abrir Modal" />
    <br />
    <br />
    <asp:Panel ID="Panel1" runat="server">
        hola<asp:Button ID="Button2" runat="server" Text="Cerrar Modal" />
    </asp:Panel>
    <asp:ModalPopupExtender ID="Panel1_ModalPopupExtender" runat="server"  Enabled="True" PopupControlID="Panel1" TargetControlID="Button1">
    </asp:ModalPopupExtender>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT [descripcion], [id] FROM [producto]"></asp:SqlDataSource>
</asp:Content>


[Site1.Master]
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="testRadControl.Site1" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
       <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </asp:ToolkitScriptManager>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">    
            
        
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>



[web.config]
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="DefaultConnection" connectionString="Server=tcp:e9jnq1pavz.database.windows.net,1433;Database=xx;User ID=xx;Password=xx.;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.5">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <httpRuntime targetFramework="4.5" />
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>
Omar
Top achievements
Rank 1
 asked on 17 Mar 2014
2 answers
90 views
Hello. I have a form that pops ups from a SubMenu item click. I'd like to know how to detect whether or not the 'save' button was clicked when the popup is closed. I've tried using OnBeforeUnload but since the popup html is actually part of the calling page, that does not work.

My requirement is to have a popup asking if the user is sure that they want to actually close the popup and it doesn't actually matter whether or not 'save' was clicked.

Does anyone have any ideas?
Andrew
Top achievements
Rank 1
 answered on 17 Mar 2014
2 answers
136 views
Greetings,

A validation has to be performed, when the column is visible. Based on the column visibility the records read from cell (index) changes. I am having issues when I am trying to read the column visibility, it says 'undefined'. 

 var grdSitePlant = document.getElementById("ctl00_ContentPlaceHolder1_ucSitePlant_grdETASitesPlants").control.get_masterTableView();
 var unitVisible = false;
 ///Get Column COunt 
 var columnCount = grdSitePlant.get_columns().length;
                for (var i = 0; i < columnCount; i++) {
                    if (grdSitePlant.get_columns()[i].get_uniqueName() == "UNIT") { //Unable to understand, why this condition would be true even is column is hidden
                        unitVisible = true;
                    }
                }

  ///Read the row values
                for (var row = 0; row < grdSitePlant.get_dataItems().length; row++) {
                    var totqty = null;
                    var ship = null;
                    var scrap = null;

                    if (unitVisible) {
                        totqty = grdSitePlant.get_dataItems()[row]._element.cells[4].childNodes[0].innerText;
                        ship = grdSitePlant.get_dataItems()[row]._element.cells[5].childNodes[0].innerText;
                        scrap = grdSitePlant.get_dataItems()[row]._element.cells[6].childNodes[0].innerText;
                    } else {
                        totqty = grdSitePlant.get_dataItems()[row]._element.cells[3].childNodes[0].innerText;
                        ship = grdSitePlant.get_dataItems()[row]._element.cells[4].childNodes[0].innerText;
                        scrap = grdSitePlant.get_dataItems()[row]._element.cells[5].childNodes[0].innerText;
                    }
 }

Thanks,
Aman
Top achievements
Rank 1
 answered on 17 Mar 2014
4 answers
298 views
Folks.

1) Certain Rad Grid Columns back ground color changes:
I have a radgrid with 5 columns. I am using Skin="Default". But some columns Filter TextBox Background/Foregound Color are Yellow/Black.   But some columns Filter TextBox Background/Foregound Color are White/Black.  It is also happening to some columns TextBoxes in MasterTable when it is in Insert/Edit Mode. I would like to keep all columns Background/Foregound Color as White/Black.

  

 

2) Changing Screen resolution:

How to change the Screen resolution to 1024x768 only when I am within a Website using Telerik controls? Can this changes be done in a Master page so that changes reflects to all Content Pages?  We are building a local Web Intranet project for our employees (Internal Users).   I do not want to change users Screen resolution permanently Via Display Properties setting from Windows.

3)  Maximize the Page:
How to Maximize the Page (not Full Screen) after it opens? Can this be done also via Master Page?

Anyhelp or suggestions will be sincerely appreciated.

Thank you.

Aman
Top achievements
Rank 1
 answered on 17 Mar 2014
3 answers
171 views
When the mobile menu is rendered, after you touch any menu option, the mobile menu does not close automatically. Can someone please provide insight on how to make this happen please. Respectfully, Tre'
Dimitar
Telerik team
 answered on 17 Mar 2014
1 answer
104 views
Hi All ,

I recently upgraded to Telerik Version=2013.3.1324.35 and I am seeing some issues as compared to my earlier version 2010 xx .For a Bound column I had set Visible Property to false in ASPX page and when I try to access the column in Code Behind under ItemDataBound it doesn't read values but when I change Visible=true everything works as expected , Can anybody suggest how to go about the same .

Thanks
Srujan.N
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Mar 2014
5 answers
372 views

This problem just started happening about a month ago. For an
unknown reason, “some”, not all of our users are having issues with our website,
the application just hangs up for the most part,  for 10 to 15, so they say, and then the app
starts working.  The only common thing we’ve
found among them to resolve this issue is to disable their antivirus, or add an
exception to our URL. After doing that, all seems to work as expected.

We are using the latest version of controls 2014.1.225.40
 
We have disabled the antivirus on the clients with AVG,Trends and Kaspersky.  It also doesn’t
seem to be specific to a given browser, IE, Chrome, FireFox, etc.

We have not had this happen locally, just with remote customers.

Any help in trying to chase this down would be greatly appreciated.

Roger

Marin Bratanov
Telerik team
 answered on 17 Mar 2014
7 answers
127 views

Hi,

I want to use several RadEditor on my web page.  I started using the solution 1 of this page:
http://www.telerik.com/support/kb/aspnet-ajax/editor/setting-hidden-radeditor-in-edit-mode-on-click-and-putting-it-in-non-editable-mode-onblur.aspx

It works fine if I set one Radeditor on the page, but if I add another RadEditor on the page, it does not work.

The reproduce the problem, I paste text in the first RadEditor (works fine), but if I paste the same text on the second control (without reloading the page), I meet a "Stack overflow". I'm using IE9.

My telerik version :
Telerik.Web.Design, 2013.1.220.40
Telerik.Web.UI, 2013.1.220.40
Telerik.Web.UI.Skins, 2013.1.220.40

I attach a picture of the result and a sample of my web page (see below).

Can you tell me what I am doing wrong??

Thank you

Steeve

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_Test2.aspx.cs" Inherits="Web._Test2" %>
<%@ 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">
 
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <meta http-equiv="X-UA-Compatible" content="IE=8"/>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
 
        <div id="lContent" style="background-color: lightblue;">First RadEditor</div>  
     
        <div style="display:none" id="tContent">  
            <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoadMandate">  
                    <Content></Content>  
            </telerik:RadEditor
        </div>
     
        <br/><br/><br/>
     
        <div id="div1" style="background-color: lightgray;">Second RadEditor</div>  
     
        <div style="display:none" id="div2">  
            <telerik:RadEditor runat="server" ID="RadEditor2" OnClientLoad="OnClientLoadProjectDesc">  
                    <Content>RadEditor 2</Content>  
            </telerik:RadEditor
        </div>
        <telerik:RadCodeBlock ID="radCodeBlock" runat="server">
 
            <script type="text/javascript">
                var lContent, tContent;
                lContent = $get('lContent');
                tContent = $get('tContent');
                $addHandler(lContent, "click", lContent_Click);
 
 
                var div1, div2;
                div1 = $get('div1');
                div2 = $get('div2');
                $addHandler(div1, "click", div1_Click);
         
                function OnClientLoadMandate(editor, args) {
                    var topZone = $get(editor.get_id() + "Top");
                    topZone.setAttribute("unselectable", "on");
                    topZone.setAttribute("MozUserSelect", "none");
 
                    var buttons = topZone.getElementsByTagName("*");
                    for (var i = 0; i < buttons.length; i++) {
                        var a = buttons[i];
                        a.setAttribute("unselectable", "on");
                        a.style.MozUserSelect = "none";
                        a.style.MozUserFocus = "none";
                        a.style.MozUserFocus = "ignore";
                    }
                 
                    var element = document.all ? editor.get_document().body : editor.get_document();
                    $telerik.addExternalHandler(element, "blur", function(e)  
                    {  
                        var labelUpdated;  
                        var editorContent = editor.get_html(true);  
                        if (lContent.textContent == editorContent)  
                            labelUpdated = false;  
                        else  
                            labelUpdated = true;  
             
                        lContent.innerHTML = editorContent;  
                        tContent.style.display = 'none';  
                        lContent.style.display = '';  
     
                        if (labelUpdated)   
                        {  
                            //alert('Updating... ' + editorContent);  
                        }  
                    });  
                }  
     
                function lContent_Click()  
                {  
                    lContent.style.display = 'none';  
                    tContent.style.display = '';  
       
                     var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object  
                     editor.setFocus(); //set the focus on the the editor  
                     editor.set_html(lContent.innerHTML);
                 }
 
 
                 function OnClientLoadProjectDesc(editor, args) {
                     var topZone = $get(editor.get_id() + "Top");
                     topZone.setAttribute("unselectable", "on");
                     topZone.setAttribute("MozUserSelect", "none");
 
                     var buttons = topZone.getElementsByTagName("*");
                     for (var i = 0; i < buttons.length; i++) {
                         var a = buttons[i];
                         a.setAttribute("unselectable", "on");
                         a.style.MozUserSelect = "none";
                         a.style.MozUserFocus = "none";
                         a.style.MozUserFocus = "ignore";
                     }
 
                     var element = document.all ? editor.get_document().body : editor.get_document();
                     $telerik.addExternalHandler(element, "blur", function (e) {
                         var labelUpdated;
                         var editorContent = editor.get_html(true);
                         if (div1.textContent == editorContent)
                             labelUpdated = false;
                         else
                             labelUpdated = true;
 
                         div1.innerHTML = editorContent;
                         div2.style.display = 'none';
                         div1.style.display = '';
 
                         if (labelUpdated) {
                             //alert('Updating... ' + editorContent);
                         }
                     });
                 }
      
 
                 function div1_Click() {
                     div1.style.display = 'none';
                     div2.style.display = '';
 
                     var editor = $find("<%=RadEditor2.ClientID%>"); //get a reference to RadEditor client object  
                     editor.setFocus(); //set the focus on the the editor  
                     editor.set_html(div1.innerHTML);
                 }
            </script>
 
        </telerik:RadCodeBlock>
 
    </form>
</body>
</html>

 

 

 

Steeve
Top achievements
Rank 1
 answered on 17 Mar 2014
8 answers
156 views
Hi,

The radeditor flickers a lot when using IE, when setting ContentMode to Div and using AutoResize to fit content height.

See the following sample:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow: auto">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadEditor ID="re2" runat="server" AutoResizeHeight="True" ContentAreaMode="Div">
                <Content>
                    Some text<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    Delete this row!
                    <br />
                    <br />
                    <br />
                    Some more text
                </Content>
             </telerik:RadEditor>
        </div>
    </form>
</body>
</html>

Scroll down to the bottom and delete the line "Delete this row!", the entire page scrolls to the top of the Editor...

I have located the root of this behavior, it has to do with setFocus. Doing the following hack (commenting out the setFocus line):
<script type="text/javascript">
            Telerik.Web.UI.RadEditor.prototype.executeCommand = function (radCommand, setFocus, addToStack)
            {
                //Set the editor's window
                if (!radCommand.get_window())
                {
                    radCommand.set_window(this.get_contentWindow());
                }
 
                //if (false != setFocus && !this.isOpera) this.setFocus(); //Opera has a problem! Typing is discontinued.
                this._commandsManager.execute(radCommand, addToStack);
            }
        </script>

The Editor works really smooth after this hack, but of course this might have bad side effects...
This fix also makes typing at the bottom of the Editor really smooth an nice!!!

Is this something you can fix with a real solution?

Regards
Andreas
Andreas
Top achievements
Rank 1
 answered on 17 Mar 2014
0 answers
114 views
I've been able to recreate a problem using the latest version of Chrome (Version 34.0.1847.60 beta-m) and 2013.2.717.40.

I have the OnClientAppointmentClick handler wired up to my appointments with the following function


1.function editAppointment(sender, e) {
2.    var apt = e.get_appointment();
3.    sender.editAppointmentWithConfirmation(apt);
4.}

Although I've found that when dragging an appointment to resize it, not every time, but most times, the Edit Appointment dialog will appear and the resize is not successful.

Perhaps a bug? I'm unable to recreate the problem currently in the latest version of Firefox (27.0.1). I've also had others who use our application report the problem using the latest in the STABLE Chrome channel
David
Top achievements
Rank 1
 asked on 17 Mar 2014
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?