xicath
(Xicath)
June 1, 2010, 5:50am
1
hi all,
how to add class/style to each input fields for search ajax form in cgridview.
i have my own css class for each input type.
the original css, ‘filters’ not look good in IE6.
i know there is method filterCssClass, but this only effect for tr tag.
any idea?
thanks.
mdomba
(Maurizio Domba Cerin)
June 1, 2010, 6:23am
2
Indeed, the class filters is added only to the TR tag…
I just make a new CSS file like css/myproject.css and include it in the layouts/main.php as the last one, and then redefine there what I want to change…
For the filters use the:
.grid-view .filters input
or
.grid-view .filters select
xicath
(Xicath)
June 1, 2010, 7:00am
3
oh, mdomba i miss u…
thanks for reply.
but how to assign different size for each input field?
because in IE6 the size of input field is overflow.
i try ‘overflow:hidden’, but not work too.
i know IE6 is an old, but a lots of people still using it.
other browser is fine.
thanks.
mdomba
(Maurizio Domba Cerin)
June 1, 2010, 7:43am
4
There is no easy solution as I know… for that you can use the ‘filter’ property - http://www.yiiframework.com/doc/api/CDataColumn#filter-detail , for every column…
and insert custom HTML code with the class or id you need…
xicath
(Xicath)
June 1, 2010, 8:00am
5
ok thanks.
i think, I just using css trick then
just wonder want to know if any solution.
thx bro.
xicath
(Xicath)
June 2, 2010, 5:05am
6
I got it.
'filter'=>CHtml::textField('t_news[title]', '', array('style'=>'width:140px')),
this one solve tidy warning issue with empty option value:
'filter'=>CHtml::DropDownList('t_news[Status]', '', array('00'=>'No','01'=>'Yes'), array('id'=>'t_news_Status_filter', 'empty'=>'Select Status')),
the name field is hard coded, i dont like it either…
Dropdown list filter not working in IE6
Someone said this is a bugs
…