I have a model named Publised, it’s a checbox model. On my Admin View on Search it displays either 1 or 0, as in 1 being published and 0 not. What I want is to display Yes or No instead of 1 or 0.
So basically I want something
if(model->Published > 0 ){
//show Yes for each row on my Admin page
}else{
//show No for each row on my Admin page
}
I need to know how to access the model text and change it’s output. Would I have to actually change the DB input.
Ok I tried that, I get the drop down option if I click on Advance Search but not on the main search page (the widget). I’m using the generic CGridView Search model. It displays 1’s and 0’s still.
Yh that’s working but how can I get my 1’s and o’s to become Yes and No. I mean in the DB table they are stored as 1’s and 0’s so that is what the Admin page shows. Your input gave me a nice way to filter but I actually want to display Yes and No.
Right now I got
Published
Dropdownlist
1
1
1
1
0
1
but I want
Published
Dropdownlist
Yes
Yes
Yes
Yes
No
Yes
That was my original intent. Would you know how to go about this?