How To Hide Attribute In Bootstrap.widgets.tbdetailview

Hi all,

Can any one tell me that how to apply htmloption on bootstrap.widgets.TbDetailView attribute. I want to hide an attribute on runtime (by apply some condition). Following is my View.php code:




$this->widget('bootstrap.widgets.TbDetailView', array(

    'data' => $model,

    'type' => 'striped bordered condensed',

    'attributes' => array(

// I want to show bonus attribute if and only if its value is greater than 0

array('name'=>'bonus', 'value'=> $model->bonus, 'htmlOptions'=>array("style"=>"display:none;")),

),

));



You can make this using the attribute ‘visible’, like this:




$this->widget('bootstrap.widgets.TbDetailView', array(

    'data' => $model,

    'type' => 'striped bordered condensed',

    'attributes' => array(

// I want to show bonus attribute if and only if its value is greater than 0

array('name'=>'bonus', 'value'=> $model->bonus,'visible'=>false,

),

));