api/extjs/browser-part/e-br-actions.js
function getTableCellByColumnTexts(table, cellData) {

      if (table.isPanel) {
        table = table.getView();
      }

      if (typeof cellData.one === 'undefined') {
        cellData.one = true;
      }
      if (typeof cellData.index === 'undefined') {
        cellData.index = 0;
      }

      var panel = table.ownerGrid;
      var visColumns = panel.getVisibleColumns();
      var text2DataIndex = {};
      var cellSelector = null;

      visColumns.forEach(function (col) {
        var key = col.text || col.tooltip;
        text2DataIndex[key] = col.dataIndex;
        if (key === cellData.column) {
          cellSelector = table.getCellSelector(col);
        }
      });

      if (!cellSelector) {
        throw new Error('Column ' + cellData.column + ' not found in visible columns');
      }

      var row = cellData.row.slice(0);

      row = row.map(function (tup) {
        var tmpTup = tup.slice(0);
        tmpTup[0] = text2DataIndex[tup[0]];
        if (!tmpTup[0]) {
          throw new Error('getTableCellByColumnTexts: No such column text: ' + tup[0]);
        }
        return tmpTup;
      });

      var internalIds = this.findRecordIds(table.getStore(), row);

      console.log(internalIds);

      if (cellData.one && (internalIds.length > 1)) {
        throw new Error('getTableCellByColumnTexts: one is true, but found ' + internalIds.length + ' records.');
      }

      var internalId = (cellData.index < 0) ? internalIds[internalIds.length + cellData.index] :
        internalIds[cellData.index];
      var rowDomId = this.getRowDomId(table, internalId);

      var rowDom = document.getElementById(rowDomId);
      var cellDom = rowDom.querySelector(cellSelector);

      return cellDom;
    }
function getTableCellByColumnTexts(table, cellData) {

      if (table.isPanel) {
        table = table.getView();
      }

      if (typeof cellData.one === 'undefined') {
        cellData.one = true;
      }
      if (typeof cellData.index === 'undefined') {
        cellData.index = 0;
      }

      var panel = table.ownerGrid;
      var visColumns = panel.getVisibleColumns();
      var text2DataIndex = {};
      var cellSelector = null;

      visColumns.forEach(function (col) {
        var key = col.text || col.tooltip;
        text2DataIndex[key] = col.dataIndex;
        if (key === cellData.column) {
          cellSelector = table.getCellSelector(col);
        }
      });

      if (!cellSelector) {
        throw new Error('Column ' + cellData.column + ' not found in visible columns');
      }

      var row = cellData.row.slice(0);

      row = row.map(function (tup) {
        var tmpTup = tup.slice(0);
        tmpTup[0] = text2DataIndex[tup[0]];
        if (!tmpTup[0]) {
          throw new Error('getTableCellByColumnTexts: No such column text: ' + tup[0]);
        }
        return tmpTup;
      });

      var internalIds = this.findRecordIds(table.getStore(), row);

      console.log(internalIds);

      if (cellData.one && (internalIds.length > 1)) {
        throw new Error('getTableCellByColumnTexts: one is true, but found ' + internalIds.length + ' records.');
      }

      var internalId = (cellData.index < 0) ? internalIds[internalIds.length + cellData.index] :
        internalIds[cellData.index];
      var rowDomId = this.getRowDomId(table, internalId);

      var rowDom = document.getElementById(rowDomId);
      var cellDom = rowDom.querySelector(cellSelector);

      return cellDom;
    }
function getTableCellByColumnTexts ( table , cellData ) { if ( table . isPanel ) { table = table . getView ( ) ; } if ( typeof cellData . one === 'undefined' ) { cellData . one = true ; } if ( typeof cellData . index === 'undefined' ) { cellData . index = 0 ; } var panel = table . ownerGrid ; var visColumns = panel . getVisibleColumns ( ) ; var text2DataIndex = { } ; var cellSelector = null ; visColumns . forEach ( function ( col ) { var key = col . text || col . tooltip ; text2DataIndex [ key ] = col . dataIndex ; if ( key === cellData . column ) { cellSelector = table . getCellSelector ( col ) ; } } ) ; if ( ! cellSelector ) { throw new Error ( 'Column ' + cellData . column + ' not found in visible columns' ) ; } var row = cellData . row . slice ( 0 ) ; row = row . map ( function ( tup ) { var tmpTup = tup . slice ( 0 ) ; tmpTup [ 0 ] = text2DataIndex [ tup [ 0 ] ] ; if ( ! tmpTup [ 0 ] ) { throw new Error ( 'getTableCellByColumnTexts: No such column text: ' + tup [ 0 ] ) ; } return tmpTup ; } ) ; var internalIds = this . findRecordIds ( table . getStore ( ) , row ) ; console . log ( internalIds ) ; if ( cellData . one && ( internalIds . length > 1 ) ) { throw new Error ( 'getTableCellByColumnTexts: one is true, but found ' + internalIds . length + ' records.' ) ; } var internalId = ( cellData . index < 0 ) ? internalIds [ internalIds . length + cellData . index ] : internalIds [ cellData . index ] ; var rowDomId = this . getRowDomId ( table , internalId ) ; var rowDom = document . getElementById ( rowDomId ) ; var cellDom = rowDom . querySelector ( cellSelector ) ; return cellDom ; }
Gets table cell DOM element.
Gets table cell DOM element .