Search code examples
c#devexpressxtragrid

Turn off summary row from DevExpress XtraGrid


Ever since we upgraded to 13.2.7 version of DevExpress, a summary row has been added to the Detail view of several Xtragrids that have master-detail.

I have been trying to figure out how I can turn the summary row off, but cannot seem to find the correct property. Hoping someone can help me get this turned off.

Image of grid:

enter image description here


Solution

  • There are two possible way that you may have added Summary row ( present in DevExpress.XtraGrid.StyleFormatCondition class ) to your code:

    1. From the code :

    If you add Summary row from code then you simply remove the code which look like -

    GridColumnSummaryItem s1 = new GridColumnSummaryItem();
                s1.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                s1.DisplayFormat = "Payable Amount : {0:n5}";
    

    2. From the Designew :

    If you have added Summary row from the Designer then follow this steps-

    1. Select your GridControle and Run Designer
    2. Then select the column name under 'Column' option from the side bar Select "SummaryItem" and
    3. romeve the selected option from this property.

    Please take help of this image.

    Image 1: Follow marked steps to solve using designer if used