[CLOSED] get set of elements of dynamic usercontrol

  1. #1

    [CLOSED] get set of elements of dynamic usercontrol

    Hello , how can I change values ​​of elements of a ' UserControl ' and access control methods in the parent page

       protected void carregarOcorrencias(int i)
        {
            Ext.Net.Panel p = new Ext.Net.Panel();
            UserControlLoader ucl = new UserControlLoader();
    
            ucl.Path = "~/CONTROLS/ocorrenciasMural.ascx";
    
           // ucl.setValues("test");
    
            ucl.UserControlAdded += ucl_UserControlAdded;
            ucl.ID = i.ToString();
    
            p.Items.Add(ucl);
    
            this.panelOcorrencias.Items.Add(p);
    
            p.Render();
        }
    Last edited by Daniil; Jul 21, 2015 at 7:11 PM. Reason: [CLOSED]
  2. #2
    Hello @miltonfoti,

    Welcome to the Ext.NET forums!

    I am not sure I understood the question correctly, but:
    (ucl.UserControls[0] as UserControlClass).SetValues("test");
  3. #3

    thanks

    Thank You.

    I could not apply your code. but your code helped me find an alternative way to solve this problem.

    <%@ Register src="~/CONTROLS/ocorrenciasMural.ascx" tagname="soc" tagprefix="uc" %>
        protected void carregarOcorrencias(int i)
        {
    
            CONTROLS_ocorrenciasMural c = (CONTROLS_ocorrenciasMural)this.LoadControl("~/CONTROLS/ocorrenciasMural.ascx");
    
            DataTable dt = new DataTable();
            dt = ocorrencia.buscarOcorrencias();       
    
            c.setValues(dt);   
    
            this.panelOcorrencias.ContentControls.Add(c);
    
        }

Similar Threads

  1. Replies: 3
    Last Post: Oct 24, 2014, 8:51 AM
  2. Replies: 2
    Last Post: Nov 29, 2012, 9:30 AM
  3. Dynamic UserControl + Direct Events
    By Zdenek in forum 2.x Help
    Replies: 4
    Last Post: Jul 22, 2012, 5:51 PM
  4. dynamic load usercontrol in ext:pannel.
    By PrasadJoshi in forum 1.x Help
    Replies: 5
    Last Post: Jan 17, 2011, 9:54 AM
  5. Dynamic grid in usercontrol
    By methode in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 04, 2008, 4:55 PM

Tags for this Thread

Posting Permissions