Dropdown Value Show Table ?

hello,

I don’t find any code to create dropdownlist contain table value when clicked.

like picture below :

5732

table.png

please help me,

Same question in the forum few years ago :

http://www.yiiframework.com/forum/index.php/topic/18631-cactivedataprovider-queries-in-dropdownlists/

[b]Please, search before asking.

[/b]

Also, you need to understand well how cgridview and CActiveDataProvider Works :

http://www.yiiframework.com/wiki/278/cgridview-render-customized-complex-datacolumns/

http://www.yiiframework.com/wiki/381/cgridview-clistview-and-cactivedataprovider/

thank you Louis for your reply,

I mean that values of dropdownlist show in table style like picture in my above post.

here is my code :




<?php echo CHtml::dropDownList('NKP','', CHtml::listData(SubPerkiraan::model()->findAll(), 'KD_SubPerkiraan', 'concate'));?>



my code’s ouput likes picture below :

5733

table2.png

but it is default style of dropdownlist I think. so I want the values shown in table style.

Oh, ok… So it’s just CSS and JS…

Well, the best thing to do is to use BootStrap for yii :

http://yiibooster.clevertech.biz/

And use button dropdown instead of list dropdown :

http://getbootstrap.com/components/#btn-dropdowns