Thanks a lot.
var mastertable = grid.getMasterTable();
var columns = mastertable.getColumns();
var column = columns;
// the column shows m for male, w for female
<button type="button" onclick="foo()">Filter Me!</button>