Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
128 views
Hey Guys,
Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_cpPageBody_ctl00_cpPageBody_reImageResources_Uploader_4_imgMainImagePanel'. If it is being updated dynamically then it must be inside another UpdatePanel.' when calling method: [nsIDOMEventListener::handleEvent]

I know this one is well talked about, but I can't find a lead that fits our exact usage.

The scenario is this: I have a form which holds a resources control.  This control loads in dynamically a variable number of another control for uploading images.  It does this according to a set of resources defined on the object being edited in the parent form.
When the resources are already populated on this object being edited, the initial call (in page_init) to RenderEditor() works just fine.  However, RenderEditor() is also called by an AJAX event on yet another control in the form - the one which actually changes which resources exists on the object being edited in the main form.  When this control is updated, an event fires which tells the resources control to RenderEditor() - and get the new config, and get the new imageupload controls to add in.  The update triggers just fine.

However, when the ResourceEditor control tries to do its dynamic load - I get the above error.  it is strange because the very panel it is looking for is one of the dynamically loaded ones - i.e how can it not find something that it had to find in the first place to get its ID ?

I realise this sounds a little vague, so I will summarise and then attach the code from my Resources control:

Control in form dynamically loads in sub-controls according to a config.  On load version works fine.
Second control in form changes that config and notifies first control it needs to update.
AJAX update fires OK, update is attempted but error is then thrown.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ResourceEditor.ascx.cs" Inherits="ArtsHub.Controls.ResourceEditor" %>
<%@ Reference Control="~/shared/controls/images/ImageUploader.ascx" %>
<asp:PlaceHolder ID="phDynamicUploads" runat="server" />
<asp:Literal ID="litTest" runat="server" Text="initialised" />
 And the code behind:
public partial class ResourceEditor : System.Web.UI.UserControl
{
    public Globals.SectionIds Section { get; set; }
    public ResourceTypes ResourceType { get; set; }
 
    public void RefreshResources(TemplateChangedEventArgs e)
    {           
        //BLL.Emailing.Emailing.EmailBug("Got to Refresh Resources from viewstate" , e.Resources.Count.ToString());
        RenderEditor(e.Resources);
    }
 
    /// <summary>
    /// Main dynamic control load method - takes the list of resources as param
    /// </summary>
    public void RenderEditor(List<Resource> theseResources)
    {
        litTest.Text = string.Format("<h2>There were {0} Resources to load", theseResources.Count);
 
        foreach (Resource r in theseResources)
        {
            // Only process the filtered type from the control
            if (r.ResourceType == ResourceType)
            {
                ImageUploader thisUploader = (ImageUploader)Page.LoadControl("/shared/controls/images/ImageUploader.ascx");
                thisUploader.ID = "Uploader_" + r.ResourceId.ToString();
                thisUploader.SectionId = Section;
                thisUploader.Width = r.Width;
                thisUploader.Height = r.Height;
                thisUploader.ImageType = r.ImageType.Value;
                thisUploader.ImageURL = ImageFactory.GetListingImageURL((int)Section, Utilities.GetListingId, r.ImageType.Value); // Get Original Image for preview
 
                Label thisLabel = new Label();
                thisLabel.Text = r.Description;
 
                //BLL.Emailing.Emailing.EmailBug("Loading res " + r.ResourceId, "");
 
                phDynamicUploads.Controls.Add(thisLabel);
                phDynamicUploads.Controls.Add(thisUploader);
            }
        }
    }
}
 If anyone could shed some light on this I'd be most grateful.

Thanks
Maria Ilieva
Telerik team
 answered on 20 Jun 2012
3 answers
217 views
Do any of the file managers know how to handle Azure blob storage?
If yes, where can I find a document on how to configure them?

Thanks,
Adrian.
Jonathan
Top achievements
Rank 1
 answered on 20 Jun 2012
4 answers
107 views
Is het possible, and if it is, then how, to place the last ribbonBarTab at the most right of the screen. E.g. the last tab could be including the "Help" features, and that is usually at the most right of the ribbon.
In that way we get a closer resemblence with the usual windows applications.
Regards,
Frank
Ivan Zhekov
Telerik team
 answered on 20 Jun 2012
8 answers
218 views
Hello,

I have a scheduler and it has the following properties:

<telerik:RadScheduler runat="server" ID="Scheduler"
GroupBy="Date,JobTitle"
GroupingDirection="Vertical"
DataKeyField="ID"         
DataSubjectField="Subject"
DataStartField="Start"
DataEndField="End"
SelectedView="MultiDayView"
ShowAllDayRow="false"           
ShowHeader="false"
ShowFooter="false"
ShowFullTime="true"
MinutesPerRow="60"
MultiDayView-ColumnHeaderDateFormat="dddd"
StartInsertingInAdvancedForm="true"
StartEditingInAdvancedForm="true"
OverflowBehavior="Expand"

My scheduler displays 8 days at a time, so it is quite long (OverflowBehavior="Expand"). When I press delete button of appointment, the confirmation dialog appears. And it appears at the center of scheduler, so user have to scroll the page down. This is very confusing and I need your help to find a workaround solution...
Waqas
Top achievements
Rank 1
 answered on 20 Jun 2012
1 answer
295 views
hi dear telerik admin,
please see this thread : 
RadComboBox Advanced Multiple Selection

and this is my RadComboBox :

<telerik:RadComboBox ID="radcbFrom" runat="server" DataSourceID="sdsFrom_WebSites"
    DataTextField="From_WebSite" DataValueField="From_WebSite" EnableEmbeddedSkins="false"
    Skin="BlackByMe" ValidationGroup="A" Width="240px" LoadingMessage="Loading ..."
    CausesValidation="False" MaxHeight="150px" AppendDataBoundItems="True" HighlightTemplatedItems="true"
    OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing"
    OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" OnClientBlur="OnClientBlur">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="All" Value="-1" />
    </Items>
    <ItemTemplate>
        <asp:CheckBox runat="server" ID="CheckBox" onclick="checkboxClick();" Text='<%# DataBinder.Eval(Container, "Text") %>' />
    </ItemTemplate>
</telerik:RadComboBox>

all of my server and client side codes are like that example.
my problem is when my page is loaded there is no "All" text next it's check box. 
what is the problem and how can i fix? 
as you see my radcombobox is a little different from that example.
in my situation there is sql datasource and AppendDataBoundItems="True"

thanks in advance
Ivana
Telerik team
 answered on 20 Jun 2012
1 answer
160 views
hy,

I have a radcombobox and i am showing context menu on this control.I want highlight or show an image on the selected item of radcontextmenu.

I have tried like this
function RadContextMenu1_ItemClicked(sender, args) {
      args._item.set_selectedImageUrl("~/Images/Selected.png")
}

Help me
Princy
Top achievements
Rank 2
 answered on 20 Jun 2012
1 answer
119 views
Hi, I am trying to bind to a hierarchical grid using DetailTableDataBind with DataTable.Select as described here.

GridDataItem parentItem = (GridDataItem)e.DetailTableView.ParentItem;
DataTable dt = (DataTable)e.DetailTableView.DataSource;
e.DetailTableView.DataSource = dt.Select("BQRef == '" + parentItem["BQRef"].Text + "'");

But upon binding, I've received an error, stating "Cannot find a cell bound to column name 'BQRef'". Any ideas? Thanks in advance.
Jayesh Goyani
Top achievements
Rank 2
 answered on 20 Jun 2012
0 answers
128 views
Hi All,

I have tried Telerik ASP.Net Ajax Component trial version, and I have development some simple application in visual studio and working well, but After I tried to publish and deploy in IIS, and try to call the application that I've developed before, the page /application not working properly, the page has showed but freeze, the ajax is not work. anoyone can help me?

nb:
I develop and publish in same machine (win server 2008 R2 64bit)

thanks,
Pantara
Rory
Top achievements
Rank 1
 asked on 20 Jun 2012
1 answer
72 views
Hello,

How could i change the following code in order to support multiple resources (ResourceType User cannot be concurrently to more than one ResourceType Room)?

using System.Web.UI;
using Telerik.Web.UI;
 
namespace Telerik.Web.Examples.Scheduler.Default
{
    public partial class DefaultCS : System.Web.UI.Page
    {
        private const int AppointmentsLimit = 1;
 
        private bool ExceedsLimit(Appointment apt)
        {
            int appointmentsCount = 0;
            foreach (Appointment existingApt in RadScheduler1.Appointments.GetAppointmentsInRange(apt.Start, apt.End))
            {
                if (existingApt.Visible)
                    appointmentsCount++;
            }
 
            return (appointmentsCount > AppointmentsLimit - 1);
        }
 
        private bool AppointmentsOverlap(Appointment appointment)
        {
            if (ExceedsLimit(appointment))
            {
                foreach (Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(appointment.Start, appointment.End))
                {
                    if (a.ID != appointment.ID)
                    {
                        return true;
                    }
                }
            }
 
            return false;
        }
 
        private void RegisterScript()
        {
            Label1.Text = "Invalid move! There are appointments arranged for this time period.";
            ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated",
                    "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 2000).fadeOut('slow');", true);
        }
 
        protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
        {
            if (ExceedsLimit(e.Appointment))
            {
                e.Cancel = true;
                RegisterScript();
            }
        }
 
        protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
        {
            if (AppointmentsOverlap(e.ModifiedAppointment))
            {
                e.Cancel = true;
                RegisterScript();
            }
        }
 
        protected void RadScheduler1_RecurrenceExceptionCreated(object sender, RecurrenceExceptionCreatedEventArgs e)
        {
            if(AppointmentsOverlap(e.ExceptionAppointment))
            {
                e.Cancel = true;
                RegisterScript();
            }
        }
    }
}


This is how did i try to give a solution to this problem:

protected bool ExceedsLimit(Appointment apt)
    {
        
        foreach (Appointment existingApt in RadScheduler1.Appointments.GetAppointmentsInRange(apt.Start, apt.End))
        {
            foreach (Resource existingRes in existingApt.Resources.GetResourcesByType("User"))
            {
 
                if (((apt.Resources.GetResource(existingRes.Type, existingRes.Key)) != null))
                {
                         
                        return true;
                }
            }
        }
     
        return false;
    }
 
    private bool AppointmentsOverlap(Appointment appointment)
    {
        
            foreach (Appointment a in RadScheduler1.Appointments.GetAppointmentsInRange(appointment.Start, appointment.End))
            {
                 
 
                    if (ExceedsLimit(appointment) && a.ID != appointment.ID)
                    {
                        return true;
                    }
                
            }
       
 
        return false;
    }
 
 
    protected void RadScheduler1_AppointmentInsert(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
    {
        if (ExceedsLimit(e.Appointment))
        {
            Messages.Text = "This resource has already been scheduled for this time slot.";
            e.Cancel = true;
            
 
 
             
        }
    }
 
    protected void RadScheduler1_AppointmentUpdate(object sender, Telerik.Web.UI.AppointmentUpdateEventArgs e)
    {
        if (AppointmentsOverlap(e.ModifiedAppointment))
        {
            Messages.Text = "This resource has already been scheduled for this time slot.";
            e.Cancel = true;
 
 
 
        }
    }

  Thank you very much.
Plamen
Telerik team
 answered on 20 Jun 2012
3 answers
72 views
Hi, I'm working with RadGrid in different pages of my website, usually those pages have headers controls and other buttons like Save, Close etc.

When the user is inserting or updating an item in the grid they usually don't see the checkmark button in the edit line and try to click others buttons in the page to save or commit changes.

I was wondering if it's possible to gray out all the page but the edit line inside the grid until the user save or cancel the changes using the grid line buttons, similar to the Radwindow behavior. this could be done using some radcontrols or there is any tweak to the radgrid to accomplish that?

Thanks a lot.
Shinu
Top achievements
Rank 2
 answered on 20 Jun 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?