Get column Index from Column Id

Hi



Am setting the ids of the column as the no of columns in my grid is dynamic.

I want to set some rows to hidden using a java script function.

Is there any method to get the column index of the column from the column id?

i came across this method getColumnId().

Is the reverse of this method available?

Is there any method to get the column index of the column from the column id?
id => index
    var id = grid.getColumnId(index);

index => id
    var index = grid.getColIndexById(id);