Home Forums WinForms controls Xceed Grid for WinForms Custom summary row

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16572 |

    We are currently evaluating two WinForms grids: Xceed and DevExpress.

     

    The redistributable files for DevExpress add up to around 10mb including the printing library, however Xceed is around 2.4mb which is making a strong case for our SmartClient application.

     

    I am currently converting a DevExpress prototype to use Xceed and have run into a problem with the SummaryRow concept. Please see the attached image before reading further.

     

      

    Person1, Person2 and Totals are all data-bound rows.

    Variance is the summary row.

     

    The user manually sums the values for Person1/Person2 etc and enters values into the Totals row. The Variance row shows the difference between the calculated sum of Person1/Person2/etc and the value manually by the user.

     

    I can’t find a way of setting a custom calculation rule for this summary row.

     

    With DevExpress this setup is quite straight-forward:

     

    Configure each summary item for each cell in the summary row and then add a delegate which will handle the calculation event.

     

     GridGroupSummaryItem summaryItem = new GridGroupSummaryItem();

     summaryItem.FieldName = “Name”;

     summaryItem.SummaryType = SummaryItemType.Custom;

     summaryItem.DisplayFormat = “Variance”;

     summaryItem.ShowInGroupColumnFooter = View.Columns[“FullName”];

     

    gridView1.CustomSummaryCalculate += new CustomSummaryEventHandler(gridView1_CustomSummaryCalculate);

     

    Would it be possible to make a similar thing happen with the Xceed grid?

     

    Imported from legacy forums. Posted by Alex (had 1263 views)

    User (Old forums)
    Member
    Post count: 23064

    The SummaryRow class does not provide a custom summary calculation, so this is not possible to do this.  You would have to use a ValueRow in place of the SummaryRow, and provide your own calculation, on some event like the ValueChanged event of the Totals row for example.

    Imported from legacy forums. Posted by André (had 1416 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.