Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Wpf DataGrid Multi Column Headers possible?
posted

Hi,

I found this page about Multi Column Headers in the Infragistics datagrid, But it is about ASP.Net https://es.infragistics.com/samples/aspnet/data-grid/multi-column-headers. I couldn't find a similar feature for the wpf version of the datagrid. Does this exist or do I have to built it myself?

Best regards

Tobias

  • 6365
    Offline posted

    Hello Tobias,

    Thank you for the sample reference you have provided.

    The answer to your questions is yes, the XamDataGrid has a Field Grouping feature, which allows you to group multiple fields under a common header.

    XAML:

    <igDP:FieldLayout>
        <igDP:TextField Name="Name" />
        <igDP:FieldGroup Label="Info">
            <igDP:NumericField Name="Id" />
            <igDP:NumericField Name="Price" />
        </igDP:FieldGroup>
        <igDP:NumericField Name="Weight" />
    </igDP:FieldLayout>

    I have attached a sample application that demonstrates the approach from above.
    For more detailed information, you can take a look at the "xamDataGrid > Organization > Field Grouping" sample from our WPF Samples Browser.

    If you have any questions, please let me know.

    XamDataGrid_sample.zip