Welcome to the Xceed Community | Help
Community Search  
More Search Options

Fixed Footer with summary row in XAML

Sort Posts: Previous Next
  •  05-15-2012, 7:05 AM Post no. 32107

    Fixed Footer with summary row in XAML

    Hi, I'm trying to add a fixed footer to a 4.2 DataGridControl, with the ultimate aim of using it as a summary row.

    I've been looking at the  'SummariesAndStatistics' example, which does everything I need to do, but it seems to wire stuff up in C# which I don't want to do.  The answers to similar questions on here also seem to use C#.

    Is there a way to add a fixed footer row, containing a summary, to a grid using only XAML? 

    Filed under: , ,
  •  06-10-2012, 11:18 AM Post no. 32227 in reply to 32107

    Re: Fixed Footer with summary row in XAML

    Hi Grant,

    This is possible with the DataGrid. An example of this is shown in the documentation which can be found here. In the first example on this topic, the StatRow was added to the GroupConfiguration's footer, which is not what you want. What you could do, is take your DataTemplate which contains the StatRow + StatCells and add it to the FixedFooters of your view. For example:

    XAML

    -------------------

    <xcdg:DataGridControl.View>
       <xcdg:TableflowView>
          <xcdg:TableflowView.FixedFooters>
             <DataTemplate>
                <xcdg:StatRow>
                   <xcdg:StatCell FieldName="UnitPrice"
                                  ResultPropertyName="unitprice_sum"/>
                   <xcdg:StatCell FieldName="Quantity"
                                  ResultPropertyName="quantity_sum"/>
                   <xcdg:StatCell FieldName="OrderID"
                                  ResultPropertyName="orderid_count"/>
                </xcdg:StatRow>
             </DataTemplate>
          </xcdg:TableflowView.FixedFooters>
       </xcdg:TableflowView>
    </xcdg:DataGridControl.View>

    -------------------


    Marc

    Developer in Technical Support
    Xceed - Multi-talented components - http://xceed.com
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.