Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ashwini on Jun 27, 2008 01:34
open dhtmlx forum
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?
Answer posted by Support on Jun 27, 2008 02:01
>>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);