dynamically added image and getOriginalSize()

  1. #1

    dynamically added image and getOriginalSize()

    Hello,
    I have a problem when trying to use image added dynamically:
    var image = new Image { ImageUrl = "~/resources/images/Error.jpg" };
                image.Listeners.Complete.Handler = "hideLoadingMask();";
                image.ID = "imBtnMain";
                image.ResizeConfig.EnabledResizing = true;
                image.ResizeConfig.PreserveRatio = false;
                image.IDMode = IDMode.Static;
                image.ImageUrl = string.Format("{0}{1}", HandlerUrl, DateTime.Now.Ticks);
                pnlMain.Items.Add(image);
                image.Render();
    Then trying to call
    #{imBtnMain}.getOriginalSize()
    from client side and got error that method not supported. If I use static image method is accessible.
  2. #2
    Looks like guys from support team do not want to provide any help in regular help forum. Firebug gave me much better help.
    So in this case just use:
    imBtnMain.getOriginalSize();
    So looks like for dynamically added images you should use just id, but for 'static' images #{id}

Similar Threads

  1. Dynamically-added ImageCommands and DirectEvents
    By Skizzot223 in forum 1.x Help
    Replies: 1
    Last Post: Mar 29, 2012, 9:23 PM
  2. [CLOSED] Dynamically added Ext.Net.Image not converting '~/'
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 31, 2011, 7:28 AM
  3. Iteration on dynamically added controls
    By kutlu in forum 1.x Help
    Replies: 1
    Last Post: Jan 02, 2011, 7:14 PM
  4. [CLOSED] [1.0] removing dynamically added controls
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 29, 2010, 7:49 PM
  5. Populate value of dynamically added control
    By danielg in forum 1.x Help
    Replies: 0
    Last Post: Feb 09, 2009, 12:53 PM

Posting Permissions