views:

146

answers:

1

Hello I currently use the ASPxGridView from DevExpress (2010 v1). Has anyone had any success creating double headers where the first set of headers span across multiple subheaders?

     HeaderSpanColumn1
-------   -------   -------
header1|  header2|  header3
-------   -------   -------  
   3         4        bob

There doesn't seem to be much verbage about this on their support site since it isn't officially supported.

+1  A: 

For the columns you can use the HeaderCaptionTemplate:

<dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
    DataSourceID="AccessDataSource1" KeyFieldName="CustomerID">
    <Columns>
        <dxwgv:GridViewDataTextColumn FieldName="CustomerID" ReadOnly="True" VisibleIndex="0">
            <HeaderCaptionTemplate>
                <table>
                    <tr align="center">
                        <td colspan="2">
                            1o Semester</td>
                    </tr>
                    <tr align="center">
                        <td style="width: 100px">
                            1o Exam</td>
                        <td style="width: 100px">
                            2o Exam</td>
                    </tr>
                </table>
            </HeaderCaptionTemplate>
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="CompanyName" VisibleIndex="1">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="City" VisibleIndex="2">
        </dxwgv:GridViewDataTextColumn>
        <dxwgv:GridViewDataTextColumn FieldName="Country" VisibleIndex="3">
        </dxwgv:GridViewDataTextColumn>
    </Columns>
</dxwgv:ASPxGridView>

This suggestion is also worth tracking: Suggestion Details: ASPXGridView - support bands (multi-header columns)

Mehul