3.2.0

Get Column Index by columnname

Hi there,

I like to now how i can get the column index by columnname.

What I would like to do is the following:
Based on the click of a row, select the value of a specific column (by column name) and pass that value to another function.

I need the index by columnname because of the functionality to re-order the columns.

Thanks in advance.

Nathan
Nathan
August 20,
I am using the numeric position for that, but I would use something like:

function getColumnPosition(colName){ //or initial colNum pos
var columnPos ='';
for(x=0;x<Mycolumns.length;x++){
if(obj.getColumnIndices()[x]==colName){ // or == Mycolumns[colNum]
columnPos = x;
break;
}
}
return columnPos;
}
///(not tested)
Carlos
August 22,
Uppsss, should be:

if(Mycolumns[obj.getColumnIndices()[x]]==colName){
// or
if(obj.getColumnIndices()[x]==colNum){
August 22,

This topic is archived.

See also:


Back to support forum