11/11/2011 1:33:53 AM
RE:Grouping, Webparts and Document Types
Miro, the documentation is ok and helped a bit but I think it confused me even more. And its a bit frustrating there are so many different documentation documents. I typically go to the Developer docs right away but they didn't help much.
What I have is a custom document type, with 4 fields, PaintCodeID, PaintCodeText, PaintCodeNote, PaintCodeGroup. PaintCodeGroup is a dropdown list with 5 or so items in them. The items are colors (Red, Green, Yellow, etc.) Each paint code record can have only one PaintCodeGroup. So I want to get all 50 paint codes out and group them by the PaintCodeGroup and display all the PaintCodeText nested within the PaintCodeGroup. I've setup a custom query in the PaintCode document type to SELECT DISTINCT PaintCodeGroup and it returns what I want.
I've also setup a few transformations:
Hierarchical: PaintCodeGroup which looks at the document type MCA.PaintCode and uses transformation PaintCodeGroupName.
ASCX: PaintCodeGroupName which has a single line <h2><%# Eval("PaintCodeGroup") %></h2>
ASCX: PaintCodeNested which has this code:
<cms:CMSDataList ID="PaintCodeNested" runat="server"
TransformationName="MCA.PaintCode.PaintCodeNestedResults" RepeatColumns="1" >
ASCX: PaintCodeNestedResults which has this code:
<%# Eval("PaintCodeText") %>
<%# IfEmpty(Eval("PaintCodeNotes"), "", "<br /> <b>Note: </b>" + Eval("PaintCodeNotes"))%>
Then I've added a UniViewer w/Custom Query and specified my query I mentioned above that gets DISTINCT PaintCodeGroup names. I've set the Hierarchical transformation to PaintCodeGroup. I've set the Transformation to PaintCodeNested and set the NestedControslId = PaintCodeNested and left everything else at their defaults and get no results and no errors.
By the way, I'm doing all this from the front end in CMSDesk and the UI. I've also tried the Repeater/DataList combo with no success either. Any further direction would be appreciated!