I am trying to customise CListView to meet my needs.
Basically on a page of an item from the DB (let’s say a series) I have sub items (let’s say books).
I decided to use the CListView to display these sub items on their parent form.
The problem I am finding is that I have made the CListView display like a table (since the CGridView did not fit our needs) and the "no results found" shows an empty table.
Is there a way I can, in the template or something, count the amount of rows found and if no results found will be shown tell the CListView to not show certain parts of my template?
@ScallioXTX, the problem with CGridView is that is seems to show that filtering form no matter what. This is normally ok but when I have the parent form as "Series" with sub objects of "Series" the two forms collide and ruin the page due to the way I must display the form.
@jacmoe Yea I am turning towards this path now actually, just make the CActiveDataProvider within the model and if it is empty don’t show at all. Thanks for re-enforcing my latter idea.
@zaccaria, the problem with using empty text is that it just defines what is shown instead of "No results found".
Due to the way my template works it still shows the table below. That’s why I didn’t use it originally because it doesn’t mould the template around whether or not the dataprovider is empty it just dictates the text to be shown.