public function initializeCell($cell, $columnIndex, $itemType)
{
if ($itemType === TListItemType::Item || $itemType === TListItemType::AlternatingItem || $itemType === TListItemType::EditItem || $itemType === TListItemType::SelectedItem) {
if ($this->getDataField() !== '') {
$cell->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn'));
} else {
$text = $this->getText();
if ($this->getEncode()) {
$text = THttpUtility::htmlEncode($text);
}
$cell->setText($text);
}
} else {
parent::initializeCell($cell, $columnIndex, $itemType);
}
}