/** * Add column * @param string name * @param string label * @param array options * @return Column */ public function addColumn($name, $label = null, array $options = array()) { $column = new Column($this["columns"], $name); $column->setLabel($label); $this->setOptions($column, $options); return $column; }
/** * Add column * @param string $name * @param string $label * @param callback $renderer * @return Column */ public function addColumn($name, $label, $renderer = null) { $column = new Column($this["columns"], $name); $column->setLabel($label); if ($renderer) { $column->setCellRenderer($renderer); } return $column; }
/** * Add column * @param string name * @param string label * @param array options * @return Column */ public function addColumn($name, $label = null, array $options = array()) { $componentName = \Nette\Utils\Strings::webalize($name); $componentName = strtr($componentName, '-', '_'); $column = new Column($this['columns'], $componentName); $column->setColumnName($name); $column->setLabel($label); $this->setOptions($column, $options); return $column; }