grouping dropdownlist

giving to the listdata method the parameter to group items in a activeDropDownList return an exception Invalid argument supplied for foreach() at line 886 of CHtml file.

rel 100.

More details on how to reproduce this?

<?php echo CHtml::activeDropDownList($job_orders,'jbr_customer',



			array('prompt'=>'seleziona')); ?>

where customers is a table with cst_pk as primary key, and cst_description and cst_number as fields. as you can see i'm trying to group by cst_number

From the code, I can't see any problem. Could you print_r(CHtml::listData(…))? Line 886 is complaining that the list data is not an array.

What is cst_pk, cst_description? are they string or constant?

It is also recommended that you use customers::model() instead of CActiveRecord::model(customers).