AddListener for Ext.Panel Runtime from codebehind

  1. #1

    AddListener for Ext.Panel Runtime from codebehind

    Hello Team Master,

    I'm trying to create a similar calendar panel grid, with simple ext.panel (I must customize other function, so Calendar Panel doesn't help me).
    When I'm creating my ext.panel runtime from C# (for celldays or cellweek) I can set properties as ID , HTML , BORDERSTYLE but i can't handle click on panel.

    this is my function:

    string fn = "Ext.Msg.alert('Confirm', String.format('You Clicked {0}', el.id));";
    string MinWk = 'Ciao';
    for (i = 1,iweek=1; (i <= 48); i++) 
    {
    Ext.Net.Panel PanelGrid = new Ext.Net.Panel();
    PanelGrid.ID = NomePanel + i + month;
    PanelGrid.Header = false; 
    PanelGrid.Html = (i == iweek) ? "<p>" + MinWk + "</p>" : "<p>" + i + "</p>";
    //PanelGrid.AddListener("render", "function(el) {el.body.on('click',function(){" + fn + "})}");
    //PanelGrid.On("click", "function(el) {" + fn + "}");
    
    
    // I'm rendering 48 Panels inside TableLayout named LayoutGridCal ,so I must create Cell also
    
     Cell mycell = new Cell();
    //mycell.CellCls = (i == iweek) ? "cellaW" : "cellaD";
    mycell.Items.Add(PanelGrid);
    
    // 
    
    LayoutGridCal.Cells.Add(mycell);
    
    // Counter for Special Week different from normal Calendar Week
    MinWk = (i == iweek) ? MinWk+1 : MinWk;
    iweek = (i==iweek)?iweek + 8:iweek;
    }
    Both way doesn't work (On or AddListener).

    Someone could help me?

    Having a nice day

    Fabio
  2. #2
    Someone can help me? Please..

Similar Threads

  1. TabPanel : Add Panel in runtime
    By megang in forum 1.x Help
    Replies: 0
    Last Post: Jun 13, 2012, 9:43 AM
  2. TabPanel : Add Panel in runtime
    By megang in forum 1.x Help
    Replies: 0
    Last Post: Jun 13, 2012, 9:34 AM
  3. Replies: 4
    Last Post: Apr 22, 2011, 9:30 PM
  4. [CLOSED] [1.0] Add and remove Panel runtime
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 21, 2010, 5:01 PM
  5. Using AddListener on Fields to add a Listener
    By r_honey in forum 1.x Help
    Replies: 6
    Last Post: Mar 08, 2009, 12:40 PM

Posting Permissions