<?php

if ($data) {
    $user = User::model()->findByPk($data->secretaryId);
    $text = '';
    if ($user) {
        $text = getFormatedUsername($user);
    }
    echo '<div style="display:inline;">' . CHtml::encode($text) . '</div>';
}

$name = 'Secretary[' . $row . '][secretaryId]';
echo Chtml::activeHiddenField($data, 'secretaryId', array('name' => $name, 'placeholder' => 'secretaryId'));
$name = 'Secretary[' . $row . '][dataId]';
echo Chtml::activeHiddenField($data, 'id', array('name' => $name, 'placeholder' => 'dataId'));
