Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
156 views
Hi, I am using the Telerik 2011 Q2 in my application. This application is working fine on localhost but when i host this application on the Web server it generates the following error on frequent basis. Pls guide me as i get different Telerik errors on different time.

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 2466
Char: 38
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=c4Ftygkbe8gSekcXuHqgZVqH4P6_5qKuAWp1Lc-ZCEPyiypgS0_9IjAkiNnMQsSmK3g0--MxmfwNMpwkeUGw-ME77EUuNDaJYQUrOtEOYOJ7x41AhJxJRs-HgvvjSc5EKQm0A57VsM9ZH8Zhf2R6Yg2&t=3a1336b1

this is another error i get.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; BTRS102569; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 14 Feb 2013 18:53:19 UTC

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 2466
Char: 38
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.ScrollerOrientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 2466
Char: 38
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.AttributeCollection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.RadTab has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.RadPageViewCollection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.RadDatePickerPopupDirection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 2466
Char: 38
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.RadDatePicker has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.PasswordStrengthChecker has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

Message: Sys.InvalidOperationException: Type Telerik.Web.UI.DateParsing.DateEvaluator has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.
Line: 1439
Char: 42
Code: 0
URI: http://db.nwtltd.net/ScriptResource.axd?d=4ewKTCJBo2j59UFab78bgCAYeUrQNTGTJPA2KwF54J-q38mz0nD-rkzsIvsRYcLQsCdcRmj42AMZbi7v2ayOt7HuGoIsdoa36Shfp231vwxxwqW0M_Fqf-zXRMdBeH1S6tWD6oufVvLbYZjtpY_WOw2&t=3a1336b1

I did not get these error on localhost.  

Antonio Stoilkov
Telerik team
 answered on 19 Feb 2013
3 answers
188 views
Hi,

I am trying to implement enhanced filtering as described on this page http://www.telerik.com/help/aspnet-ajax/grid-basic-filtering.html and in this video http://www.telerikwatch.com/2008/09/telerik-watch-minute-enhancing-radgrid.html.

The idea is to allow the user to enter filter expressions like >=27, *ed and <>100 then hit Enter to execute the filter.  My problem is with numeric fields which don't allow non numeric characters to be entered in the filter text box so you can't enter <>= characters.  

I am using version 2011.3.1115.35

I have created a very simple page that demonstrates the problem. (see below) The page has a grid that uses the Products table in the Northwind sql database as a datasource.  Any advice would begreatly appreciated.

Thanks 

Terry

Here is the code for an example page that demonstrates the problem:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Filters1.aspx.vb" Inherits="FramesAndCasesWebApp.Filters1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>FilterOnEnter</title>
 
    <script type="text/javascript">
        var tableView = null;
        var cancelFilterMenu = false;
 
        function filterOnEnter(sender, e, gridId, columnName) {
 
            //Only filter on Enter (check keyCode)
            if (e.keyCode == 13) {
 
                //Disable filter menu from showing [BROWSER BUG FIX]
                cancelFilterMenu = true;
 
                if (tableView == null)
                    tableView = $find(gridId).get_masterTableView();
 
                //Try to auto set the filter function
                var filter = Telerik.Web.UI.GridFilterFunction.Contains;  //Default
 
                var query = sender.value;
                if (query.endsWith("*") && query.startsWith("*")) {
                    filter = Telerik.Web.UI.GridFilterFunction.Contains;
                    query = query.substr(1, query.length - 2);
                }
                else if (query.startsWith("*")) {
                    filter = Telerik.Web.UI.GridFilterFunction.EndsWith;
                    query = query.substr(1, query.length - 1);
                }
                else if (query.endsWith("*")) {
                    filter = Telerik.Web.UI.GridFilterFunction.StartsWith;
                    query = query.substr(0, query.length - 1);
                }
                else if (query.startsWith("=")) {
                    filter = Telerik.Web.UI.GridFilterFunction.EqualTo;
                    query = query.substr(1, query.length - 1);
                }
                else if (query.startsWith("<>")) {
                    filter = Telerik.Web.UI.GridFilterFunction.NotEqualTo;
                    query = query.substr(2, query.length - 2);
                }
                else if (query.startsWith("<")) {
                    filter = Telerik.Web.UI.GridFilterFunction.LessThan;
                    query = query.substr(1, query.length - 1);
                }
                else if (query.startsWith("<=")) {
                    filter = Telerik.Web.UI.GridFilterFunction.LessThanOrEqualTo;
                    query = query.substr(2, query.length - 2);
                }
                else if (query.startsWith(">")) {
                    filter = Telerik.Web.UI.GridFilterFunction.GreaterThan;
                    query = query.substr(1, query.length - 1);
                }
                else if (query.startsWith(">=")) {
                    filter = Telerik.Web.UI.GridFilterFunction.GreaterThanOrEqualTo;
                    query = query.substr(2, query.length - 2);
                }
 
                var column = tableView.getColumnByUniqueName(columnName);
 
                //Execute filter
                tableView.filter(columnName, query, filter);
            }
        }
 
        //Handle browser inconsistencies that cause
        //the filter menu to be displayed on enter key press
        function filterMenuShowing(menu, args) {
            if (cancelFilterMenu)
                args.set_cancel(true);
 
            cancelFilterMenu = false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server"
            AllowFilteringByColumn="true"
            AllowPaging="true"
            AllowSorting="true"
            DataSourceID="SqlDataSource1" EnableLinqExpressions="False">
            <MasterTableView AutoGenerateColumns="True" DataKeyNames="ProductID"
                DataSourceID="SqlDataSource1"/>
 
            <FilterMenu EnableImageSprites="False" OnClientShowing="filterMenuShowing">
            </FilterMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="Data Source=SQL\SQL2008;Initial Catalog=Northwind;Integrated Security=True"
            ProviderName="System.Data.SqlClient"
            SelectCommand="SELECT Products.* FROM Products"></asp:SqlDataSource>
     
    </div>
    </form>
</body>
</html>

and here is the code behind

Imports Telerik.Web.UI
 
Public Class Filters1
    Inherits System.Web.UI.Page
 
    Private Sub RadGrid1_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
        If TypeOf e.Item Is GridFilteringItem Then
 
            Dim filterItem As GridFilteringItem = e.Item
 
            ' Add client-side event handlers for the filter textbox in each data column
            For Each col As GridColumn In RadGrid1.MasterTableView.RenderColumns
 
                ' Ignore non-data columns
                If col.UniqueName = "ExpandColumn" Or col.UniqueName = "RowIndicator" Then
                    Continue For
                End If
 
                ' Get the column name
                Dim columnName As String = col.UniqueName
 
                ' If this column filter has a textbox ...
                Debug.Print(columnName & ": " & TypeName(filterItem(columnName).Controls(0)))
                If TypeOf filterItem(columnName).Controls(0) Is TextBox Then
                    ' Get a reference to the filter textbox for this column
                    Dim textBox As TextBox = filterItem(columnName).Controls(0)
 
                    If textBox IsNot Nothing Then
                        ' Add the event handler
                        textBox.Attributes.Add("onkeypress", String.Format("filterOnEnter(this, event, ""{0}"", ""{1}"");", RadGrid1.ClientID, columnName))
                    End If
                End If
            Next
        End If
    End Sub
End Class


Kostadin
Telerik team
 answered on 19 Feb 2013
1 answer
193 views
Hi,

We have discovered a really nasty thing with the RadListBox. In my sample below, the CPU will hit 100% and memory will go up to about 2GB (happens in both IE10 and Firefox, Chrome seems unaffected) for about 10 seconds. Will often crash the browser since we hit the 2GB limit if other tabs are open...

This only occurs when the listbox is located inside an iframe, in my example I did this using a RadWindow, but a normal IFrame would do the same...

Here is the main page:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="window.aspx.vb" Inherits="TestaTredjepartWeb.window" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
            <Windows>
                <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true" AutoSize="true" NavigateUrl="listbox.aspx">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
    </div>
    </form>
</body>
</html>

And here is the content page:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="listbox.aspx.vb" Inherits="TestaTredjepartWeb.listbox" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="s" runat="server">
        </asp:ScriptManager>
        <div>
            <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadListBox ID="rlb" runat="server" Width="330px" AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true">
                        <Items>
                            <telerik:RadListBoxItem Text="aaa" />
                            <telerik:RadListBoxItem Text="bbb" />
                            <telerik:RadListBoxItem Text="ccc" />
                            <telerik:RadListBoxItem Text="ddd" />
                            <telerik:RadListBoxItem Text="eee" />
                            <telerik:RadListBoxItem Text="fff" />
                            <telerik:RadListBoxItem Text="ggg" />
                            <telerik:RadListBoxItem Text="hhh" />
                        </Items>
                    </telerik:RadListBox>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>

The listbox need to have autopostbackonreorder and be located in an updatepanel.
To get this behavior:
1. Move one item up or down by drag and drop.
2. Move the cursor outside the radwindow (the mousout of the window will trigger this behavior)

When profiling the script, it is the following function that is the problem:
RadListBox._onDocumentMouseOut

Regards
Caesar
Bozhidar
Telerik team
 answered on 19 Feb 2013
7 answers
82 views
We are using the RadEditor with the LinkManager.ascx dialog (v2012.3.1308.45). We had to extend the link manager to add additional attributes to the link. To do so, we modified the _insertClickHandler function in link manager to the following:

_insertClickHandler: function (e) {

var modifiedLink = this.getModifiedLink();
modifiedLink.setAttribute("LinkOptions", "2");

var args = new Telerik.Web.UI.EditorCommandEventArgs("LinkManager", null, modifiedLink);
//backwards compatibility
args.realLink = modifiedLink;
Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference().close(args);

},

This worked fine in our previous version of controls (v2011.something). After upgrading this now returns a link without the added attribute at the beginning of the editor.

Expected results:

some text.....
< a href LinkOptions="2" / >
some text....


Actual results:
< a href / >
some text...
some text...

I also tried the following:

_insertClickHandler: function (e) {
var modifiedLink = this.getModifiedLink();
modifiedLink.setAttribute("LinkOptions", "2");

var args = new Telerik.Web.UI.EditorCommandEventArgs("LinkManager", null, modifiedLink);
//backwards compatibility
args.realLink = modifiedLink;

var editor = this._clientParameters.editor;
editor.pasteHtml(args.value.outerHTML);

Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference().close();
},


Not handing in args to the close routine keeps the added attribute and paste position and works well in chrome, but not in IE. How can I return the link I want at the cursor position? This worked great in previous versions. I don't want Telerik assuming that 'LinkOptions' is an invalid element and stripping it before it gets to the editor.

Thanks
Rumen
Telerik team
 answered on 19 Feb 2013
1 answer
94 views
Hi,

I am new to telerik and slowly working my way through the product so please excuse my ignorance.

I have looked at the Window MDI example which I think might be  quite a nice way to present my Dashboards and BI Forms. Where I am a little confused is that in the menu item you place the URL in the value property as opposed to the navigate URL property. The challenge I have is that normally, if using a standard menu, I would put something like ~/Sales/DailySales.aspx in the navigate URL property but the same does not work for the Value property.

In all the examples I have seen the all call external URL's using a fully qualified URL. If I try and use ~/sales/DailySales.aspx it cannot find the page.

What am I doing wrong?

Campbell
Marin Bratanov
Telerik team
 answered on 19 Feb 2013
1 answer
109 views
I'm having an issue with frozen colums and the RadGrid.  The problem exist with IE9 and Chrome.  When the webpage completes rendering the Radgrid paints with all rows showing (in this case there are only four rows) then it collaspes to 2 rows showing with a vertical scroll bar.
After resizing the webpage manual (by one or two pixels) the Radgrid will repaint all four rows will show,  the vertical scroll bar goes away, and the frozen colums work as expected.  As a hack, I tried using the windows.onload event to resize the window and move the window to see if that would fix the issue--it does not.  I also tried the onGridCreated function and it did not resolve the issue. Any ideas?   

Thanks
Angel Petrov
Telerik team
 answered on 19 Feb 2013
1 answer
113 views
Is there a way to reduce the number of ScriptResource.axd files that load when a page is requested?  I routinely have upwards of 20 of these files load each request.
Dimitar Terziev
Telerik team
 answered on 19 Feb 2013
2 answers
202 views

I am having some trouble figuring out how to get the row index value from the radgrid.

Using Microsoft Gridview I 've been able to accomplish the following:

 

Dim row As GridViewRow = DirectCast(btnDetails.NamingContainer, GridViewRow)

 

 

'Grab the LabAcc_PK and feed it to the Lab details datasource
' finally, rebind the detailview

  
DBConnect.Open()

cmd.Connection = DBConnect
cmd.CommandType = Data.CommandType.StoredProcedure

cmd.CommandText = "usp_GetLabAccountDetails"

 
 'Add Parameters of SQL Procedure

 
cmd.Parameters.AddWithValue("LabAcc_PK", Convert.ToString(Gridview1.(row.RowIndex).Value))


How do I do the same thing but using the radgrid.

thanks -

Danny
Top achievements
Rank 1
 answered on 19 Feb 2013
2 answers
178 views
Hi,

I am using RadEditor with the InsertLink dialog, which opens a custom dialog.
when I select the link and right-click on it, I get a context menu and when I choose set link properties, I get an exception regarding the dialogs handler which is not registered in my web.config. I tried to add it, but I still get the exception.

Finally, I decided to disable the right-click on link items.
I tried your example:
                                   
    <telerik:EditorContextMenu TagName="A" Enabled="false">
      
<telerik:EditorTool Name="SetLinkProperties" />
      <
telerik:EditorTool Name="Unlink" />
    </
telerik:EditorContextMenu>

but I get an exception regarding spell-check:

'..\App_Data\RadSpell\en-US.tdf' is missing. The spellchecking functionality of RadEditor requires a dictionary file named 'en-US.tdf' in the '..\App_Data\RadSpell\' folder. Please, ensure that all needed dictionary files from the original RadEditor distribution are present. See the help for more details Controls > RadEditor > Spellchecker

How can I cancel the option to right-click on a link? Why do I get spellchecker error?
or how can I show my dialog on "set link properties"?

do you have any idea?

Thanks for your help.
Covertix
Top achievements
Rank 1
 answered on 19 Feb 2013
0 answers
78 views


if i put   ProjectName.DataBind(); after the records are come in radlistbox
if i don't put that record are shown one time but for each doesn't go inside

see the screen shot
.cs

if (service[0].grupname.ToString() == "SubCon")
                                {
                                    using (var db = new DoskContractServicesDataContext(Globals.strCon))
                                    {
                                       
                                        var Projec = (from a in db.DSProjectMasters where a.FinalStatus == "Cls" && a.Status != "Del" select new { a.ProjectCode, a.ProjectTitle }).ToList();
                                        ProjectName.DataSource = Projec;
                                        ProjectName.DataValueField = "ProjectCode";
                                        ProjectName.DataTextField = "ProjectTitle";
                                        ProjectName.DataBind();
                                    }
 
                                    ProjNam.Visible = true;
                                    ProjectName.Visible = true;
 
                                    string md = service[0].Projectid.ToString();
 
                                    string[] Projid = md.Split(',');
 
                                    for (int i = 0; i < Projid.Length; i++)
                                    {
                                        string val = Projid[i].ToString();
                                        int m = 0;
 
                                        foreach (RadListBoxItem item1 in ProjectName.Items)
                                        {
                                            string Md1 = ProjectName.Items[m].Value;
                                            if (Md1 == val)
                                            {
                                                item1.Checked = true;
                                            }
                                            m++;
                                        }
                                    }
                                }



Thanks Advance,
Mohamed.
mohamed
Top achievements
Rank 1
 asked on 19 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?