How to get column by name (in JavaScript)

3 replies. Last post: September 8, 2009 10:47 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Eric Member

I used this JavaScript part:

function SetGridTitle(gridID,title)
{
	var grid=ISGetObject(gridID);
	grid.RootTable.Columns[0].GetElement().innerText=title;
	return true;
}

This crashed, because .GetElement() returned null. The problem was that I have several invisible columns in the grid, so I have to use Columns[12] instead. I don't want to hardcode the column number (12) here.

How do I get the column by its name?

I know the function wgGetCellByName, but that seems to be only for a row. I assume there is something similar for the columns. I also don't want to loop over all columns, because I assume there already exists a function for that purpose.

 

All times are GMT -5. The time now is 1:12 PM.
Previous Next