Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
455 views

I'm using an older version of Telerik that doesn't have the ASP 4.0 fix and it's causing my grid control to throw an error when paging.  The error is:  Microsoft JScript runtime error: Object doesn't support property or method '_destroyTree'

I found a fix on these forums that works very well when used on a normal ASPX page... 

<script type="text/javascript">
$telerik.disposeElement = function (element) {
if (typeof (Sys.WebForms) == "undefined")
return;
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm && prm._destroyTree)
prm._destroyTree(element);
else if (Sys.Application.disposeElement)
Sys.Application.disposeElement(element, true);
};
Telerik.Web.UI.RadComboBox.prototype._removeDropDown = function () {
var slide = this.get_dropDownElement().parentNode;
slide.parentNode.removeChild(slide);
if (this._disposeChildElements)
$telerik.disposeElement(slide);
if (!$telerik.isSafari)
slide.outerHTML = null;
this._dropDownElement = null;
};
</script>


My problems is that I am using user controls on much of the site.  If I place this in the ASCX file, I get the same error as if I didn't have it there.  If I place it in the ASPX that the user control is added to, I get this error: Microsoft JScript runtime error: Unable to get value of the property 'prototype': object is null or undefined most likely because the user control with the grid isn't loaded yet.

I can place the script inside an IF statement... if (Telerik.Web.UI.RadComboBox != null) { } and that gets rid of the prototype error, but it acts like the script isn't there because I still get the original _destroyTree error.

Can someone tell me what I need to do in order to make this work inside a user control?  Here's the layout of my pages...

  • Master Page with update panel and placeholders.
    • Inside one placeholder, I have a sidebar where I have an accordion menu.
      • This placeholder is filled in with an ASPX page.
    • Inside the other placeholder, I have the main content area.
      • This placeholder is filled in with an ASCX user control based on what is clicked on the menu in the first placeholder.
      • Separate user controls are loaded dynamically based on the menu selection.
      • The user controls in this placeholder are where my grids are that need paging.

So what I need is to include the fix script in each user control that uses a grid so that I can page.  If it were possible to include it on the master page so I don't have to put it on every user control, or if I could put it on the ASPX page that is in the first placeholder and have it work even when a new user control is loaded, then that would be great.  But I don't mind including it in every user control if that is what's needed for this to work.  I can also include a .JS file if that is what's needed.  Keep in mind that these are inside an update panel, so the postback will be asynchronous in case that matters.

Any help would be greatly appreciated.  It was decided that we wouldn't be updating Telerik, so I'm stuck with trying to make this work with just the script fix.  This is really the only issue I'm having with Telerik and 4.0 with our site, so there isn't enough incentive to buy a newer version.

Just as a reminder, the script above works perfectly when used on a normal ASPX page that has the grid right on it rather than the grid being on a user control that is loaded later.

Jeremy
Top achievements
Rank 1
 answered on 07 May 2012
5 answers
247 views
Hi,

We are using latest version of Teleriks. I want to change the question icon to my own icon on RadConfirm window.

Please note: Telerik.Web.UI.dll is referenced and we are not using skin folder in the root directory of the application

Need a solution to change the icon with out changing in xml file.

Thanks
Sreenivas.
L
Top achievements
Rank 1
 answered on 07 May 2012
5 answers
170 views
Hi,
I am new to telerik grid.
This is what I am trying to do.   I want to place a combo box or drop down box in a cell of a grid.  however, the grid is only being populated in the codebehind.
>>

 

List<KI_Controls.KI_Multimedia> oPrimaryMM = oPrimaryContact.GetAllMultimedia();

BindingList<cKIWebMultiMediaContent> Populatelist = new BindingList<cKIWebMultiMediaContent>();

 

 

 

for (int i = 0; i < oPrimaryMM.Count; i++)

{

 

 

cKIWebMultiMediaContent otemp = new cKIWebMultiMediaContent();

otemp.MultiMediaType = oPrimaryMM[i].Multimedia_Type;

otemp.MultiMediaText = oPrimaryMM[i].Value;

Populatelist.Add(otemp);

}

gridMainMultimedia.DataSource = Populatelist;


So this automatically creates 2 columns. MultiMediaType and MultiMediaText.

I want to make the MultiMediaType a dropdown and load it manually.

I see you have a lot of samples using datasources and design time binding.  Do you have a simple dropdown grid example which all is unbound?
Richard
Top achievements
Rank 1
 answered on 07 May 2012
6 answers
270 views
Hi,

I am using the Telerik Scheduler on my site. At the moment, I am doing local testing. My

The server method getresources failed
The server method getappointments failed

Now I am using WCF. I have the service interface and implementation in the website project and my .svc file points to this service (path is fine).

My service implementation looks like this:

  [ServiceContract(Namespace = "")] 
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] 
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)] 
    public class Scheduler 
    { 
        private WebServiceAppointmentController _controller; 
 
        private WebServiceAppointmentController Controller 
        { 
            get 
            { 
                if (_controller == null) 
                { 
                    _controller = 
                        new WebServiceAppointmentController( 
                            new XmlSchedulerProvider(HttpContext.Current.Server.MapPath("~/Content/Schedule.xml"), 
                                                     false)); 
                } 
                return _controller; 
            } 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo) 
        { 
            return Controller.GetAppointments(schedulerInfo); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) 
        { 
            return Controller.InsertAppointment(schedulerInfo, appointmentData); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) 
        { 
            return Controller.UpdateAppointment(schedulerInfo, appointmentData); 
        } 
 
        [OperationContract] 
        public IEnumerable<AppointmentData> CreateRecurrenceException(SchedulerInfo schedulerInfo, 
                                                                      AppointmentData recurrenceExceptionData) 
        { 
            return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData); 
        } 
 
 
        [OperationContract] 
        public IEnumerable<ResourceData> GetResources(SchedulerInfo schedulerInfo) 
        { 
            return Controller.GetResources(schedulerInfo); 
        } 
 
    } 


And the aspx:

      <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Black" Visible="true" SelectedDate="2009-02-02" 
                        Width="1043px"
                    <Localization AdvancedAllDayEvent="All day"></Localization> 
                    <AdvancedForm DateFormat="dd/MM/yyyy" TimeFormat="HH:mm"></AdvancedForm> 
                    <WebServiceSettings Path="Service.svc" /> 
                    </telerik:RadScheduler> 

These errors appear even if I press the buttons on the control.

What am I missing?


PPT
Top achievements
Rank 1
 answered on 07 May 2012
2 answers
73 views
I have an "User Control Edit Form " (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx), consider that EmployeeDetailsCS.ascx contains two list boxes with server side events (something like that: http://demos.telerik.com/aspnet-ajax/listbox/examples/serverside/serverevents/defaultcs.aspx). List boxes have have as a datasouce two list (let's say "employeeTasks" and "allTasks"), and every time i transferr an item those lists are updated and the database is updated too. I can't make a refresh to this "user control edit form" every time an item is transfered, to be able to see the new "content" of two lists. Any ideea how to do this?
Pavlina
Telerik team
 answered on 07 May 2012
1 answer
59 views
Hi,
 
   In a RADEditor control, if the user provide the input as "Hello world" and he select the word with context menu as "Hel" and I need to provide the alert message as "Please select the full word as 'Hello'".How to implement this functionality?
Rumen
Telerik team
 answered on 07 May 2012
1 answer
81 views
Hello,
How can i wrap a selected area with an div? I would like a selected area with a div like this:
<div class="paging">slected area (p's, div's etc.)</div>
Is this possible? How can I do this?

br
Reiner
Rumen
Telerik team
 answered on 07 May 2012
3 answers
157 views
In this RadSchedule demo, it mentions that you can use AllowMultipleValues for a resource to allow a many to many relationship. How do you do that with a SQL Server data source?
Peter
Telerik team
 answered on 07 May 2012
1 answer
92 views
Hi,

  • I have these software in my desktop:
Win Server 2003
SharePoint 2007 (MOSS)
Sharepoint service 3.0
Visual Studio 2010
IIS 6
.net AJAX 3.5

  • I installaed RadControls for .net AJAX 3.5 BY walking through these steps:

 

1) Installing RadControls from ZIP file
http://www.telerik.com/help/aspnet-ajax/introduction-all-conrols-from-zip.html

2) Setting ASPNET (Network Service) Permissions
http://www.telerik.com/help/aspnet-ajax/introduction-setting-aspnet-permissions.html

3) Add RadControls to the Global Assembly Cache
http://www.telerik.com/help/aspnet-ajax/introduction-add-to-global-assembly-cache.html

4) Extending your SharePoint 2007 site with Microsoft ASP.NET AJAX 3.5
http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html

5) Deploying RadControls for ASP.NET Ajax (EXCEPT STEP 3)
http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html

6) Installing RadEditor in a MOSS 2007 farm
http://www.telerik.com/help/aspnet-ajax/moss-installing-radeditor-in-moss-2007-farm.html

7) Create an AJAX-enabled SharePoint WebPart that uses RadControls (The error appear after this step)
http://www.telerik.com/help/aspnet-ajax/moss-create-ajax-enabled-sharepoint-webpart-radcontrols.html

Sharepoint Log Has this error:
OWSTIMER.EXE (0x1280)        0x1454 Windows SharePoint Services    General         Medium   Entering MRU trim routine.

Note:
I am adding the controls to by website by creating it using C# classes, so I need to add RadEditor and Rad Calenred to my website using c# classes not adding it directly to the sharepoint site (adding webpart).

My problem is: I cannat add any radeditor to my website using creatchildconrols although i did the prvios steps and addd Telerik.Web.Design.dll and Telerik.Web.UI.dll to the references
and using the namespaces

using System.Web.UI;

using Telerik.Web.UI;

when I add the controls (this.Controls.Add(this.radEditor))the attached error appears.


Question: What exactly I need to do to start using RadControls?


Thank you for your help

 


Rumen
Telerik team
 answered on 07 May 2012
3 answers
88 views
Is it possible to setup RadEditor to pull styles from a different domain? For example, taking your example from the help page:

<telerik:RadEditor runat="server" ID="RadEditor1">
    <CssFiles>
        <telerik:EditorCssFile Value="~/ExternalCssFiles/Styles1.css" />
        <telerik:EditorCssFile Value="~/ExternalCssFiles/Styles2.css" />
    </CssFiles>
</telerik:RadEditor>

Can I do something like this:

<telerik:RadEditor runat="server" ID="RadEditor1">
    <CssFiles>
        <telerik:EditorCssFile Value="http://www.mysite.com/styles/Styles1.css" />
        <telerik:EditorCssFile Value="http://www.mysite.com/styles/Styles2.css" />
    </CssFiles>
</telerik:RadEditor>

If not directly, do you have any recommendations on how I could implement something like this? I'm building a rather large CMS that will control content for multiple sites inside a single area and within the editor I would like for styles that show up to mimic the ones actually on the site being edited.
Rumen
Telerik team
 answered on 07 May 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?