title: How to call this onclick javascript function in my architecture
body: <p>I am using this article of architecture <a href="http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/" rel="nofollow">http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/</a></p>
  
  <p>In my one class of Dashboardgrid i have two functions are : </p>
  
  <pre><code>,linkRenderer : function (data, cell, record, rowIndex, columnIndex, store) {
          if  (data != null)  {
              return '&lt;a href="javascript:void(0)" onclick="this.resellerwindow(\'' +record.data.cityname+'\')"&gt;'+ data +'&lt;/a&gt;';
          }
          return data;
      },
      resellerwindow : function (cityname) {
          // render the grid to the specified div in the page
          // resellergrid.render();
          resellerstore.load();
          wingrid.show(this);
      } 
  </code></pre>
  
  <p>when the click event of linkrendrer function is called it gives error </p>
  
  <pre><code>this.resellerwindow is not a function
  </code></pre>
  
  <p>where and how should i put resellerwindow function ?</p>
  
  <p>My ResellerDashBoard Class </p>
  
  <pre><code>Application.DashBoardGrid = Ext.extend(Ext.grid.GridPanel, {
       border:false
      ,initComponent:function() {
          var config = {
              store:new Ext.data.JsonStore({
                  // store configs
                  autoDestroy: true,
                  autoLoad :true,
                  url: 'api/index.php?_command=getresellerscount',
                  storeId: 'getresellerscount',
                  // reader configs
                  root: 'cityarray',
                  idProperty: 'cityname',
                  fields: [
                      {name: 'cityname'},
                      {name: 'totfollowup'},
                      {name: 'totcallback'},
                      {name: 'totnotintrested'},
                      {name: 'totdealsclosed'},
                      {name: 'totcallsreceived'},
                      {name: 'totcallsentered'},
                      {name: 'totresellerregistered'},
                      {name: 'countiro'},
                      {name: 'irotransferred'},
                      {name: 'irodeferred'}
                  ]
              })
              ,columns: [
                  {
                      id       :'cityname',
                      header   : 'City Name', 
                      width    : 120, 
                      sortable : true, 
                      dataIndex: 'cityname'
                  },
                  {
                      id       :'countiro',
                      header   : ' Total Prospect', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'countiro'
                  },
                   {
                      id       :'irotransferred',
                      header   : 'Calls Transfered By IRO', 
                      height : 50,
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'irotransferred'
                  },
                  {
                      id       :'irodeferred',
                      header   : ' Calls Deferred By IRO', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'irodeferred'
                  },
                  {
                      id       :'totcallsentered',
                      header   : ' Total Calls Entered', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex : 'totcallsentered',
                      renderer : this.linkRenderer
                  },
                  {
                      id       :'totfollowup',
                      header   : ' Follow Up', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'totfollowup'
                  },
                  {
                      id       :'totcallback',
                      header   : ' Call Backs', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'totcallback'
                  },
                  {
                      id       :'totnotintrested',
                      header   : ' Not Interested', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'totnotintrested'
                  },
                  {
                      id       :'totdealsclosed',
                      header   : ' Deals Closed', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'totdealsclosed'
                  },
                   {
                      id       :'totresellerregistered',
                      header   : ' Reseller Registered', 
                      width    : 100, 
                      sortable : true, 
                      dataIndex: 'totresellerregistered'
                  }
              ]
            ,plugins :[]
            ,viewConfig :{forceFit:true}
            ,tbar :[]
            ,bbar :[]
            ,height : 350
            ,width : 1060
             ,title : 'Reseller Dashboard'
  
          }; // eo config object
  
          // apply config
          Ext.apply(this, Ext.apply(this.initialConfig, config));
  
          Application.DashBoardGrid.superclass.initComponent.apply(this, arguments);
      } // eo function initComponent
      /** 
      * It is the renderer of the links of cell 
      * @param data  value of cell 
      * @param record  object of data has all the data of store and record.id is unique 
      **/
      ,linkRenderer : function (data, cell, record, rowIndex, columnIndex, store) {
          if  (data != null)  {
              return '&lt;a href="javascript:void(0)" onclick="DashBoardGrid.resellerwindow(\'' +record.data.cityname+'\')"&gt;'+ data +'&lt;/a&gt;';
          }
          return data;
      },
      resellerwindow : function (cityname) {
          // render the grid to the specified div in the page
          // resellergrid.render();
          resellerstore.load();
          wingrid.show(this);
  
      }
      ,onRender:function() {
          // this.store.load();
          Application.DashBoardGrid.superclass.onRender.apply(this, arguments);
      } // eo function onRender
  });
  
  Ext.reg('DashBoardGrid', Application.DashBoardGrid);
  </code></pre>