1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    6
    Vote Rating
    0
    Flix is on a distinguished road

      0  

    Default Checklist

    Checklist


    I try a to create a list with green checked or gray unchecked pictures in every item. If I click on the item, the checked-status should change.

    If I used a list with itemTpl, but there I can't access the store data. So I tried the tpl. This works, but now there is no itemtap-Event. Now I tried to use a html-Code onclick-Event. This works, but I only can access external functions without store access.

    here is the code:
    PHP Code:
    var chkWlist = new Ext.List({
           
    fullscreentrue,
        
    xtype'list'
              
    checkField'schongemacht',
              
    displayField'WorkshopName',
              
    trueValuetrue,
              
    falseValuefalse,
        
    grouped false,
        
    indexBarfalse,
        
    ui:'dark',
        
    itemTpl ''// wird eh ├╝berschrieben
        
    storestore,

        
    listeners: {
            
       
        
    beforerender: function(){
             
    this.tpl = new Ext.XTemplate(
                 
    '<tpl for="."><div class="x-checklist" style="padding: .5em; margin-right:2px;font-size: 18px;border-top: 1px solid white; border-bottom: 1px solid #eaeaea" onclick="changeWorkshopSel({#})"><img src="Pics/{[ values.' this.checkField '==' this.trueValue '? "check.png" : "uncheck.png"]}" height="15" width="15" /> {' this.displayField '}</div></tpl>',
    // changeWorkshopSel is an external function and can't access the store-data
                

                  
    checkFieldthis.checkField,
                  
    trueValuethis.trueValue,
                  
    displayFieldthis.displayField
                
    });
             
    this.refresh();            
        }
        }
    }); 
    I hope you can halp me
    Flix

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    303
    Vote Rating
    3
    steve1964 is on a distinguished road

      0  

    Default


    Hi, take a look at this post, the showcase app have a list with checbox:
    http://www.sencha.com/forum/showthre...ncha-Touch-app

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    6
    Vote Rating
    0
    Flix is on a distinguished road

      0  

    Default


    thank you

Thread Participants: 1

Tags for this Thread