PDA

View Full Version : Extjs4.0 Grid render issue



seamas
27 Jul 2012, 1:25 AM
Hi,

The following is my Extjs code and my question.

function myTest(val,metaData,record){

How to get the currentColumn itemId value 'OP1000_WITHHOLD_TAXES' in this function?

I want to according to itemId return val

}

var grid = Ext.create('Ext.grid.Panel', {
id : 'planGrid',
plugins : [ filterRow ],
columns : [
{
id:'currentColum'
text : 'Taxes',
sortable : true,
layout : 'fit',
dataIndex : 'withholdTaxes',
renderer : myTest,
itemId : 'OP1000_WITHHOLD_TAXES'
}}
});



Thank you very much for your help

Seamas

sword-it
27 Jul 2012, 2:15 AM
Hi seamas,
Try the code given below:



function myTest(val,metaData,record){
var itemId = grid.columns[columnIndex].itemId;
}


where columnIndex -> index of current column e.g: 0 , 1

seamas
27 Jul 2012, 2:47 AM
Hi
It is working , Thank you very much