javascript - How to determine what cell has been clicked? -


i new javascript , having use extjs 3.4. have created simple tree 3 columns. know either cell selected, or even, row , column selected.

i using example sencha uses @ http://dev.sencha.com/deploy/ext-3.4.0/examples/treegrid/treegrid.html :

  var tree = new ext.ux.tree.treegrid({     title: 'core team projects',     width: 500,     height: 300,     renderto: ext.getbody(),     enabledd: true,      columns:[{         header: 'task',         dataindex: 'task',         width: 230     },{         header: 'duration',         width: 100,         dataindex: 'duration',         align: 'center',         sorttype: 'asfloat',         tpl: new ext.xtemplate('{duration:this.formathours}', {             formathours: function(v) {                 if(v < 1) {                     return math.round(v * 60) + ' mins';                 } else if (math.floor(v) !== v) {                     var min = v - math.floor(v);                     return math.floor(v) + 'h ' + math.round(min * 60) + 'm';                 } else {                     return v + ' hour' + (v === 1 ? '' : 's');                 }             }         })     },{         header: 'assigned to',         width: 150,         dataindex: 'user'     }],      dataurl: 'treegrid-data.json' }); 

is possible in extjs 3.4? can node not see telling me cell or column or row selected.

any appreciated!

you need attach listeners e.g.

 listeners: {                 afterrender: function(p) {                     p.body.on('click', function() { // function tapping clicks on panel                     alert(p.gettargetel().dom.innerhtml);                                              });                     });               } 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -