joji
(Jojimltm)
1
How to make sortable header in clistview
This is my example header
<thead class="bg-light">
<tr>
<th>ID</th>
<th>Name</th>
</tr>
</thead>
I want to make id and name sortable. sortableAttributes render a seperate section for sorting.
Thanks in advance.
$dataProvider=new CActiveDataProvider('Post');
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_post', // refers to the partial view named '_post'
'sortableAttributes'=>array(
'title',
'create_time'=>'Post Time',
),
));
cheers
joji
(Jojimltm)
3
It just render seperate sort section in <ul><li>
I want to customize it inside <tr><th>