Telerik Forums
UI for ASP.NET AJAX Forum
25 answers
257 views
I have a page with a SkinMaster control:

<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" Skin="Sunset"</telerik:RadSkinManager>

The page was working ok in production environment for about a year. Recently, I upgraded to Telerik.Web.UI.dll 2011.2.712.40. After that I started getting exceptions of this type:

Exception type: ArgumentException

    Exception message: Item has already been added. Key in dictionary: 'Telerik.Web.SkinsAssembly'  Key being added: 'Telerik.Web.SkinsAssembly'

   at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String name, Object value)

   at Telerik.Web.SkinRegistrar.GetDefaultSkinsAssemblyName()

   at Telerik.Web.SkinRegistrar.GetAllEmbeddedSkins(RadSkinManager skinManager)

   at Telerik.Web.UI.RadSkinManager.FillSkins(RadComboBox chooser)

   at System.Web.UI.Control.InitRecursive(Control namingContainer)

   at System.Web.UI.Control.InitRecursive(Control namingContainer)

   at System.Web.UI.Control.InitRecursive(Control namingContainer)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


The error seems to be random, it appeared twice within 10 days. So far i can't reproduce it. I get notified about the error from my web server alert service and I don't know if users get any visual indications of the error or no. I have no way of asking the users.

Any clues?

Tsvetoslav
Telerik team
 answered on 19 Dec 2012
1 answer
67 views
Hi,
How to restrict drag and drop of words in textboxes?.

Thanks & Regards
Anzar.M

Eyup
Telerik team
 answered on 19 Dec 2012
3 answers
129 views
Hi ,

I placed an user control in radgrid CommandItemtemplate. I have to access and get the reference of this User Control in Need DataSource. Is it possible ?

Regards,

Prasad
Princy
Top achievements
Rank 2
 answered on 19 Dec 2012
3 answers
100 views
Hi,

i've a page asp with a panel object. With this panel i msut update backgroundimage with javascript function.
I call the radwindow with this code:

                 function openRadWindowCard() {
                     var panel;
                     panel = document.getElementById('<%= Panel1.ClientID %>');
                     radopen("UploadImgCard.aspx?urlcard=" + panel.style.backgroundImage, "RadWindowLoadcard");
                 }
 
                        <telerik:RadWindow ID="RadWindowLoadcard" runat="server"
                            ShowContentDuringLoad="false" Width="393px"
                            Height="300px" Title="Caricamento immagine biglietto" Behaviors="None"
                            MaxHeight="300px" MaxWidth="400px" Modal="True" IconUrl="/image/iconlogo.png"
                            OnClientClose="RefreshBackgroud" VisibleStatusbar="False" Skin="Simple" ReloadOnShow="True">
                        </telerik:RadWindow>
 
<asp:LinkButton ID="Load_sfondo" runat="server" ForeColor="#D5842B" OnClientClick="openRadWindowCard(); return false;">Carica sfondo personalizzato</asp:LinkButton>

now when close the radwindow i must trasfer the path image to master page and refresh automatic the panel's backgroundimage.

this code is:
function RefreshBackgroud(sender, eventArgs) {
    var strimage = eventArgs.get_argument();
    var panel = document.getElementById('<%= Panel1.ClientID %>');
    panel.style.backgroundImage = strimage;
    return false;
}

and this code into radwindos is:

<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
    function Close(argument) {
        GetRadWindow().close(argument);
    }
    </script>
Protected Sub Imgbtnesci_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtnesci.Click
    ScriptManager.RegisterStartupScript(Page, Me.Page.GetType(), "closeWindow", "Close('" & ViewState("DirImage") & "');", True)
End Sub

but the backgroudiamge dont update..i see with debug step to step that che variable strimage has the path correct but dont update in this code

panel.style.backgroundImage


how do you it?

bye


Princy
Top achievements
Rank 2
 answered on 19 Dec 2012
6 answers
757 views
I've been working with Telerik RadGrid, MasterTableView an I tried to export my data to Excel but with no success. The file is created and saved on my workstation but the file is not of "Excel" kind.

When I open the file it only contains HTML. Is this right? Excel says that the file is not of any correct Excel type!

Update: This error only occurs when you use "Excel Viewer" due to the fact that "Excel Viewer" can't convert the outputed HTML file to a "real" Excel formated document.

Is there anyway to get the output as a real Excel document not a invalid document in HTML?
Evan
Top achievements
Rank 1
 answered on 19 Dec 2012
3 answers
350 views
Hi,
How to restrict special characters in  rad grid?
I have the UI as below:
<telerik:GridTemplateColumn DataField="ProductNumber" HeaderText="Product Number"
                            UniqueName="ProductNumber" Visible="true">
                             
 <InsertItemTemplate>
                                <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text="">
                                </telerik:RadTextBox>
                            </InsertItemTemplate>
  
                            <EditItemTemplate>
 <telerik:RadTextBox ID="RadtxtPrdNumber" runat="server" Text='<%# Eval("ProductNumber") %>'>
                                </telerik:RadTextBox>
                            </EditItemTemplate>
                              
<ItemTemplate>
<telerik:RadTextBox ID="RadtxtPrdNumber" ReadOnly="true" runat="server" Text='<%# Eval("ProductNumber") %>' />
  </ItemTemplate>
                        </telerik:GridTemplateColumn>

I want to restrict the special characters in InsertItemTemplate and EditItemTemplate.

Thanks
Shinu
Top achievements
Rank 2
 answered on 19 Dec 2012
3 answers
200 views
Hi guys,
i've created a page asp to process of change password....there are 3 radtextbox. One radtextbox for old password and two radtextbox for new and confirm password. When there's one error i use the radnotification for to see the message but when load the radnotification form code behind, the value into radtextbox are reset, why? how can do it?
Princy
Top achievements
Rank 2
 answered on 19 Dec 2012
4 answers
130 views
I am using the Export facilities of the grid straight out of one of your examples and encountering several different problems.  The only option that is working correctly is to export to CSV.

(1) When exporting to Excel, my Excel 2010 is opening and the data is loaded from the grid, but after a few seconds, Excel goes into a loop and I have to kill it from Task Manager.

(2) When exporting to a PDF file, the PDF file never displays but I do receive a new window filled with .net errors.  (see attached screen capture.

(3) When exporting to CSV, everything works fine and the data is opened in an Excel spreadsheet which operates fine (no problem).

(4) When exporting to Word, Work 2010 starts to open then hangs (never even shows in Task Manager) and I have to click on "Cancel" on the splash screen to get out of Word.

I have included the code (both display and code-behind) below.  

The version being used is 2012.3.1016.45; Windows 8 64-bit, VS2012.  SQL Server 2008 R2 Standard.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <br /><br />
 
         <telerik:RadGrid ID="RadGrid1" AllowSorting="true" runat="server" DataSourceID="SqlDataSource1"
             AutoGenerateColumns="false" Width="100%" Height="250px" >
            <ExportSettings HideStructureColumns="true" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true">
        </ExportSettings >
 
             
 
            <MasterTableView Width="100%" CommandItemDisplay="Top">
                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="true"></CommandItemSettings>
            </MasterTableView>            
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataSet" SelectCommand="SELECT * FROM OfcAgent_List WHERE AgentRecType = 'Agent' AND AgentStatus = 'Active' AND Account = 1" SelectCommandType="Text" ConnectionString="Data Source=Lynn-PC;Initial Catalog=BrokerPlus2008_new;user id=sa;password=wheat7211"></asp:SqlDataSource>
        <br /><br />
    </div>
    </form>
</body>
</html>


using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //http://msdn.microsoft.com/en-us/library/w1kdt8w2(v=vs.90).aspx
 
        if (!Page.IsPostBack)
        {
            //  You can only define the grid columns during page load, do not also do it on postback
            DefineGrid();
        }
 
    }
    private void DefineGrid()
    {
        GridHyperLinkColumn hypercolumn = null;
        GridBoundColumn boundcolumn = null;
 
        hypercolumn = new GridHyperLinkColumn();
        this.RadGrid1.Columns.Add(hypercolumn);
        hypercolumn.HeaderText = "Edit";
        hypercolumn.Text = "<img border=\"0\" alt=\"View\" src=\"../Icons/pencil_16.png\" />";
        hypercolumn.DataNavigateUrlFields = new string[] { "Agent" };
        hypercolumn.DataNavigateUrlFormatString = "Default2.aspx?K=" + "{0}";
        hypercolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "CompanyName";
        boundcolumn.DataField = "CompanyName";
        boundcolumn.HeaderText = "Company";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "OfficeName";
        boundcolumn.DataField = "OfficeName";
        boundcolumn.HeaderText = "Office";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentID";
        boundcolumn.DataField = "AgentID";
        boundcolumn.HeaderText = "ID";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentFullName";
        boundcolumn.DataField = "AgentFullName";
        boundcolumn.HeaderText = "Name";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentCellular";
        boundcolumn.DataField = "AgentCellular";
        boundcolumn.HeaderText = "Cellular";
        boundcolumn.Visible = true;
        boundcolumn = null;
 
        boundcolumn = new GridBoundColumn();
        this.RadGrid1.Columns.Add(boundcolumn);
        boundcolumn.UniqueName = "AgentEmail";
        boundcolumn.DataField = "AgentEmail";
        boundcolumn.HeaderText = "Email";
        boundcolumn.Visible = true;
        boundcolumn = null;
    }
 
}
Lynn
Top achievements
Rank 2
 answered on 19 Dec 2012
6 answers
429 views
HI

Appologies if this has been covered, but I can't find a solution that works to my particular problem.
I have a RadMenu in a user control. This user control is in a place holder on a master page.

What I cant get to work is the menu to maintain the selected menu item when a user clicks on the menu item and the page loads.

I have enabled the EnableSelection property, but I didn't expect it to be that easy.

Andy
Kate
Telerik team
 answered on 18 Dec 2012
2 answers
48 views
  I am converting an asp.net web site application to an asp.net web Application. For some reason all controls embeded in the MultiPage are not rendering in the aspx(codeBehind) page I can email the code file if needed.
Ebenezer
Top achievements
Rank 1
 answered on 18 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?