CListView tagName=table and table header


I have choose CListView class for displaying rows. It works really nice, but I have just realized that I don’t know how to add table header because I set itemsTagName to ‘table’ so it generates table…

Is it possible at all?


[size=“2”]p.sPlease do not advice switching to CGridView :)[/size]

I’m a bit confused by what you are trying to achieve. The model has a function to get the field labels, and one for getting the Table name().

In all of the examples that I have seen on the CListView, none have a "Header". They do have a field label.

Maybe a quick example of what you are trying to create would help us help you :)

CListView does not have a method for rendering the header…

for every item… CLIstView renders the file in itemView and among other values it sends the current index of the item (zero based index)

so one solution would be… in the view to check if the index is zero… and then display the headers before the current item (first record)…

So damn easy… Thank you!!! :)

mdomba solved already the problem, but thanks for your try! :)