How to set the relative order of columns with a zfdatagrid?
To those of you who are familiar with zfdatagrid for the Zend framework:
I got a rec开发者_StackOverflowordset by a JOIN query, say from tables s and t, now I want to set the order in which the columns appear in the deployed table.
For example,
5th column of table t to appear at the leftmost side,
then 3rd column of table s, then 2nd column of table t, then 4th column of table s.How do I do this? Whatever I tried, it always shows first the columns of the left table of the JOIN, then the columns of the right table of the JOIN.
I only know how to tell it which columns to show, but not their order.
It may be late but may be useful for others
You can use:
$grid->updateColumn($field,array('position'=>$i))
精彩评论