title: How to add/put click event for the element which is in Ext.XTemplate in combobox EXT JS?
body: <p>I am trying to add click event to the element in combobox Ext js. Below is my code.</p>
  <p><code>tpl : new Ext.XTemplate('&lt;div id = &quot;selectAll&quot; class=&quot;sel-all&quot; style=&quot;padding:0 10px; cursor:pointer&quot;&gt;&lt;input type=&quot;checkbox&quot;&gt;SELECT ALL&lt;/input&gt;&lt;/div&gt;','&lt;tpl for=&quot;.&quot;&gt;', '&lt;div class=&quot;x-boundlist-item&quot;&gt;', '&lt;input type=&quot;checkbox&quot; /&gt;', '{somename}', '&lt;/div&gt;', '&lt;/tpl&gt;')</code></p>
  <p>In above, I need to select the first div with SELECT ALL text and add a click event for that. I am able to get that by this Ext.get('select'). But it will only give data when it is put under blur event or select event. Otherwise it gives null.</p>
  <p>All i want is i want to get that element and need to add click event . Like below
  <code>selectAll.onclick (){.....MY CODE...}</code> Once i clicked on that select all inbox,all the data should be selected in store data.</p>
  <p>Could you please kindly help me out.
  <strong>NOTE: This Elements is defined inside the Panel</strong></p>
  <p>My code will give the drop down like below once click on the combobox</p>
  <p>SELECT ALL
  data1
  data2
  data3
  etc..
  All will comes with check box. If i click on the data1, it will be selected(Which is working fine. Because those data are comes from store).But when i SELECT ALL it should select all the data.All check box should be selected and added the that box except SELECT ALL.</p>
  <p>Thanks in advance</p>