Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
494 views

Heely Guys

Story: I have a strange error when I try to save something I got this error message ( An entity object cannot be referenced by multiple instances of IEntityChangeTracker.)
I really don’t know what that is and why is it appear, it appears only when I try to save something my insert and update is working, only when I try to save something in db from my grid



if (this.annualVacationList != null)
      {
          List<AnnualVacation> vacationToSave = this.annualVacationList;
          IEnumerable<AnnualVacation> existing = paramUser.AnnualVacations;
          foreach (AnnualVacation toSave in vacationToSave)
          {
              AnnualVacation existingItem = existing.Where(x => x.AnnualVacationId == toSave.AnnualVacationId).SingleOrDefault();
              if (existingItem == null)
              {
                  ctx.AddToAnnualVacations(toSave);
              }
              else
              {
                  existingItem.FromDate = toSave.FromDate;
                  existingItem.ToDate = toSave.ToDate;
                  existingItem.WorkingTime = toSave.WorkingTime;
                  existingItem.VacationDays = toSave.VacationDays;
              }
          }
      }
      ctx.SaveChanges();
  }

After debugging I have seen that the code brake down in the Project.Name.Designer.cs ..... O.o


public void AddToAnnualVacations(AnnualVacation annualVacation)
   {
       base.AddObject("AnnualVacations", annualVacation);
   }




Maria Ilieva
Telerik team
 answered on 05 Dec 2012
3 answers
569 views
I'm stepping through my ASP.NET app (I didn't build it, but I'm supporting it), and all of the many references to things like RadCheckBox or RadControl seem to work perfectly well.

At the end I get an error in a very, very long script that Telerik seems to emit. There is an error in the middle of it, 'ID' variable cannot be found. It highlights 'e.detachEvents' every time, and a variable named 'ID' is nowhere close.

Any clue how I might side step this error? I hit continue and the app proceeds. And the error does not appear after deploying to the test server.

Thanks, Bob Sullentrup
Martin
Telerik team
 answered on 05 Dec 2012
1 answer
124 views
Hello.  I inherited an asp.net application that uses Telerik.Web.UI.
On this one particular page it uses asp:DropDownList that works in older browsers (i.e. Firefox 14), but the DDL would not expand in current version of Firefox, Chrome, IE.  Has anyone encountered this problem yet?
Any help is greatly appreciated.

-Hoi Pham

<telerik:RadGrid
    ID="uxRadGrid" runat="server"
    AllowPaging="True"
    AllowCustomPaging="True"
    AllowSorting="True"
    GridLines="None"
    VirtualItemCount="0"
    PageSize="1"
    OnNeedDataSource="uxRadGrid_NeedDataSource"
    AllowMultiRowSelection="True"
    AutoGenerateColumns="False"
    GroupingEnabled="False"
    OnDataBound="uxRadGrid_DataBound"
    OnItemCommand="uxRadGrid_ItemCommand"
    EnableViewState="true"
    OnItemDataBound="uxRadGrid_ItemDataBound"
    EnableEmbeddedSkins="false"
    ImagesPath="~/images/"
    onsortcommand="uxRadGrid_SortCommand"
    onselectedindexchanged="uxRadGrid_SelectedIndexChanged">

    <MasterTableView GridLines="None" RetrieveNullAsDBNull="true" AllowCustomSorting="true">
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="uxSelectCheckBox" HeaderStyle-Width="25px" Visible="false" />

            <telerik:GridTemplateColumn
                HeaderText="DayPart"
                UniqueName="uxPlaylistDayPartCol"
                HeaderStyle-Width="85"
                HeaderStyle-ForeColor="White"
                HeaderStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <asp:DropDownList ID="ddlTimeFrom" runat="server" Width="75" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>

        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Eyup
Telerik team
 answered on 05 Dec 2012
1 answer
150 views

Hi,

I need to build a photograph competition page that has a RadTabStrip which I add tabs to for each competition. Each tab contains a user control, that has a RadListView to view the member's entries and two buttons, for uploading and deleting entries.

I am having difficulty with the ItemDataBound & NeedDataSource events in the RadListView. I am not sure what to do and would appreciate it if someone could steer me in the right direction.

Kind regards,
Pierre

Eyup
Telerik team
 answered on 05 Dec 2012
1 answer
77 views

Hi,

 

I am  facing an issue with our application, the checkbox inside the Telerik  Radgrid in our application is not unchecking when it is clicked first time (as per the business logic the  grid will be loaded as few rows checked. And this issue occurring only in this scenario).  But it is unchecking on the second time clicked.  This issue we got after migrating the  application from .Net 3.5 to 4.0.

In our 3.5 application  grid is working fine in the above said scenario. we have  tried with  4.0 Telerik and Spring DLL ‘s, still we are facing the same issue.

 

Please suggest us on what we can do  to rectify the Telerik Control issue.

Andrey
Telerik team
 answered on 05 Dec 2012
3 answers
206 views
Hello,

I used the following code to generate items inside a RadComboBox

<telerik:RadComboBox ID="SearchComboBox" runat="server" Skin="Office2007">
   <ItemTemplate>
      <%# DataBinder.Eval(Container.DataItem,"Name") %>
   </ItemTemplate>
</telerik:RadComboBox>

SearchComboBox.DataSource = dataTable;
SearchComboBox.DataTextField = "Name";
SearchComboBox.DataValueField = "ID";
SearchComboBox.DataBind();

My problem is it seems that any items inside the <ItemTemplate> tag does not inherit or use the css styles defined on RadComboBox's Skin attribute. The items are generated but there's no background color changes (onmouseover) on the items.

is there a way for the items to be able to use the defined skin?

Thanks
Ivan Zhekov
Telerik team
 answered on 05 Dec 2012
8 answers
279 views
Hi there I have a list box filled with a list of course names. If a course is assigned to you then it will have a green colour block before the name, if its not assigned to you it will appear with a red block before the name. I have three radio buttons one called "All", another called "Assigned", and the last one called "Not Assigned". Is it possible when selecting assigned that the green ones will just appear and when selecting not assigned only the red ones will appear? I've tried adding the radio button code into the page load but editing the lists like this removes the items forever for example when I click on assigned it removed the red items for the remainder of that session. What is the best way to do this?

Thanks, James
Nencho
Telerik team
 answered on 05 Dec 2012
1 answer
106 views
I just installed the Tererik Controls to visual studio and when I added the RagOrgChart to my page it added just fine but when I opened it up in my browser it gave me a security warning:  Her is the HTML Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="LeapTree.aspx.vb" Inherits="Pages_Leaps_LeapTree" %>
 
<%@ 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>
    <title>Test</title>
</head>
 
<body>
    <form id="form1" runat="server">
    <telerik:RadOrgChart ID="RadOrgChart1" runat="server">
    </telerik:RadOrgChart>
 
    </form>
</body>
</html>


Server Error in '/BuisnessPlan_2' Application.

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0 System.Web.UI.NamespaceTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean throwOnError) +98 System.Web.UI.NamespaceTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +11 System.Web.UI.TagPrefixTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +127 System.Web.UI.MainTagNameToTypeMapper.GetControlType2(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +228 System.Web.UI.MainTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +28 System.Web.UI.RootBuilder.GetChildControlType(String tagName, IDictionary attribs) +20 System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) +69 System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) +526 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) +896 


Version Information: Microsoft .NET Framework Version:2.0.50727.6400; ASP.NET Version:2.0.50727.6387            
Kate
Telerik team
 answered on 05 Dec 2012
1 answer
270 views
Hi,

I downloaded the telerik suite of controls from the below location: RadControls for ASP.NET AJAX Q3 2012
 http://www.telerik.com/products/aspnet-ajax/download.aspx

I have checked this site: http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html

I am using SharePoint 2010 and trying to use the RAD Grid. I created a visual web part and added the radgrid and bound the controls.
I have the Telerik.web.ui (version 2012.3.1016.35), Telerik.Web.Design (version 2012.3.1016.35) in GAC. I have added the safecontrols as below:
<SafeControl Assembly="Telerik.Web.UI, Version=2012.3.1016.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" />
      <SafeControl Assembly="Telerik.Web.UI, Version=2012.3.1016.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.Design" TypeName="*" Safe="True" />

I have both the dll's added in 14 bin and in the  bin of the website.
I am getting the error as "could not load file or assembly Telerik.web.ui Version 2011.2.712.20,culture=neutral,PublicKeyToken=121fae78165ba3d4 . The located assembly's manifest location does not match the assembly reference.

How to fix this?
Thanks
Marin
Telerik team
 answered on 05 Dec 2012
11 answers
889 views
I have a combobox as follows:

<telerik:RadComboBox ID="ddlDevelopmentArea" runat="server" Width="200px" DropDownWidth="220px"
                    EmptyMessage="" HighlightTemplatedItems="true" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedEventHandler">
                    <HeaderTemplate>
                        <table style="width: 240px" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width: 150px;">
                                    <asp:Label runat="server">
                                        <%=AutismPro.Classroom.SR.GetString("Curriculum", "Curriculum_DesignCurriculum_DevelopmentAreaCombo_Header")%>
                                    </asp:Label>
                                </td>
                                <td style="width: 90px;">
                                    <%=AutismPro.Classroom.SR.GetString("Curriculum", "Curriculum_DesignCurriculum_DevelopmentAreaCombo_HasGoals")%>
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table style="width: 210px" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width: 150px;">
                                    <%# DataBinder.Eval(Container, "Text")%>
                                </td>
                                <td style="width: 60px;">
                                    <%# DataBinder.Eval(Container, "Attributes['HasGoals']")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:RadComboBox>

I would like to change the value of an attribute at client side. Following is my code try:

var combo = $find("<%= ddlDevelopmentArea.ClientID %>");                     
combo.trackChanges();
combo.get_selectedItem().get_attributes().setAttribute("HasGoals", "False");
combo.commitChanges();

The value gets changed in combo object but is not reflecting in UI/HTML.

Please help.

Thanks in advance.
Cat Cheshire
Top achievements
Rank 1
 answered on 05 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?