Yii transmits value to clistview/cgridview

Source: Internet
Author: User

Clistview displays data items in the list.

Unlike cgridview's table-based display of data items, clistview allows you to use a view template to display each data item. Therefore, clistview can generate more flexible display results.

Clistview supports both sorting and paging. sorting and paging can be implemented through Ajax or common request methods. the advantage of using clistview is that if your browser disables JavaScript, the sorting and paging functions are automatically converted to common page request methods.

Clistview attributes

String $ itemview: displays the view file used by data. In the View File, $ data represents a data model.
The delimiter between string $ separator data items. The default value is null, that is, no separator.
Array $ viewdata this attribute is helpful when we need to pass some values to _ view in each iteration. Other data to be passed to $ itemview. The data type is array and the transfer method is array ('valuename' => 'category '), to use this data in the $ itemview file, you only need to call $ valuename (you do not need to obtain the entire array and then take the value based on the index ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.