Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
98 views
I am currently trying to make a popup editor work clientside with a backend WS, my problem is that when i add repaint the grid to show up the new items, the ids do not match up.

So i thought that i could set the ids on the rowcreated client event like so..

Code
...
           <ItemTemplate>
                <asp:label ID="ltrl_edit" runat="server"></asp:label>
           </ItemTemplate>
....
   function RowCreated(sender, eventArgs) {
                var cid = eventArgs.get_gridDataItem().getDataKeyValue("contactID");
                var imgstr = "<img src='../smtImages/ico_Editsm.png' style='cursor:pointer' class='hightlighttracklist' onclick='initialiseEdit(" + cid + ")' />"

                var item = eventArgs.get_gridDataItem();
                var button1 = $telerik.findElement(item.get_element(), "ltrl_edit");
                $(button1).html(imgstr);
            }

  1. My problem is that when I add an item and call the repaint method (with the new data), the RowCreated event is not fired
       
       function updateGrid(result) {
                   var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                tableView.set_dataSource(result);
                tableView.dataBind();
                var grid = $find("<%= RadGrid1.ClientID %>");
                grid.repaint();
            }

Any workarounds to this would be a gratefully recieved.

Thanks

Dave

David
Top achievements
Rank 2
 answered on 20 Jun 2012
1 answer
88 views
Will the handler that the RadStyleSheetmanger uses to generate the css files execute any .NET code the css file. Example: Dynamic Colors .TestCSSClass{
    color: <%=MyStyleClass.DefaultColor()%>;
}
Ivan Zhekov
Telerik team
 answered on 20 Jun 2012
1 answer
93 views
Is there a way to drap and drop without using the RadListViewItemDragHandle ? I want to be able to drag from anywhere in the item (like how you can drag a row in the radgrid), and since the handle is rendered as an input element, I can't even use CSS to stretch it the whole width and height of my item.
Tsvetina
Telerik team
 answered on 20 Jun 2012
1 answer
120 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
211 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
99 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
212 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
284 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
150 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
115 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?