barbq
(Szymanski Slawek)
March 3, 2011, 9:22pm
1
Hi,
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?
Ray
[size=“2”]p.sPlease do not advice switching to CGridView [/size]
jkofsky
(Jkofsky)
March 3, 2011, 10:32pm
2
barbq:
Hi,
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?
Ray
[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
mdomba
(Maurizio Domba Cerin)
March 4, 2011, 7:19am
3
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)…
barbq
(Szymanski Slawek)
March 4, 2011, 4:47pm
4
mdomba:
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!!!
barbq
(Szymanski Slawek)
March 4, 2011, 4:48pm
5
jkofsky:
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
mdomba solved already the problem, but thanks for your try!