protected function init_columns($wanted, $heading = '') {
        $this->visiblecolumns = array();
        $this->extrarows = array();
        foreach ($wanted as $column) {
            if ($column->is_extra_row()) {
                $this->extrarows[get_class($column)] = $column;
            } else {
                $this->visiblecolumns[get_class($column)] = $column;
            }
        }
        if (array_key_exists($heading, $this->requiredcolumns)) {
            $this->requiredcolumns[$heading]->set_as_heading();
        }
    }