I have a web-form based on CDetailView. After it is initally shown, its fields can be separately updated via AJAX. To do so I need every cell to have distinct id. What could help is htmlOptions in every ‘attributes’ element of the CDetailView, but I don’t see such property. Any ideas? Perhaps itemtemplate could do this, but it lacks good documentation. It’s not clear how to use it.
…
Looks like ‘<tr class="{class}"><th>{label}</th><td><div id=“xyz”>{value}</div></td></tr>’ does what I need. But I’m not sure if this DOM fragment will always be compatible with CDetailView.
Each CDetailView attribute has a ‘cssClass’ element which allows you to specify any css class you wish to append to the <tr> tag. Each attribute also has a ‘template’ element which you can use to customise the attribute’s row. I haven’t used the ‘template’ element myself. I usually use something along the lines of: