We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SummaryRow in GDBG

Thread ID:





36908 Nov 11,2005 11:50 PM UTC Nov 12,2005 01:17 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On November 11, 2005 11:50 PM UTC

Stanley, I am sorry if you don''t lik emy idea of creating of new thread. I am having problem with summary row. this is something i have to finish ASAP. problem#1 could you please modify that sample to use "sumRow.WireSummaryRow(this.grid, summaryTypes, styles); " method to write the grid? I am having problem to pupulate styles since my grid has parent-child concept. having problem because these tow values are not same this.grid.Model.ColCount AND this.grid.Binder.InternalColumns[] problem #2 I have to calculate 12 differnet summary columns in my rows. do i have to create 12 different function in order to use CustomSummaryCalculation delegate? can i create one method and use column# as parameter or some instance variable? something like.. for(int i = 0; i < this.gdbgDepartmentBudget.Model.ColCount; ++i) { if( i >= 5 && i <= 12) //sum these { summaryTypes[i] = new GridSummaryRow.CustomSummaryCalculation(CalcCurrentAnnualSalary); } else //no summary summaryTypes[i] = GridSummaryRow.SummaryType.None; } Please do help me! thanks, Please do help! >Hi Kishore, > > Take a look at the GridGroupingContol which is flexible in managing hierarchical data and where the summary row is built in. Please refer to the samples that we ship syncfusion\essential studio\\Windows\Grid.Windows\samples\Grouping\CustomSummary and syncfusion\essential studio\\Windows\Grid.Windows\samples\Grouping\HierarchySample. > > To get a summary row in a GDBG there is a lot of work to be done with it. Here is a sample that shows the total rows at the end of the GDBG. The summary row is a single row of the grid control which is located at the bottom of the GDBG. The GC is synchronized with the GDBG (see GridSummaryRow.cs). In the support class through the SaveCellInfo and CellButtonClicked events, the updates are made in the summary row. > To hide any row, you will have to pass the RowIndex which, is a bit tricky as the child row gets displayed in varied row indexes. > >Please refer these samples, decide the control and let me know if you have any more questions. > >Best regards, >Stanley

Administrator [Syncfusion]
Replied On November 12, 2005 01:17 AM UTC

That sample you are referring to that uses the WireSummaryRow method was designed to be used with flat GridDataBoundGrids, not hierarchical GridDataBoundGrids. There will not be an easy way to do this with a GridDataBoundGrid. You will have to write a lot of code. The only way I would know to do this is to add unbound columns to your parent table to hold the summary values you want from the child table. Then you would have to maintain all these summaries for each child table, and then use grid.Model.QueryCellInfo to provide these summaryvalues. You can use an event like CurrentCellAcceptedChanges to update changes by your users. Here is a minimal sample. http://www.syncfusion.com/Support/user/uploads/GDBG_CoveredCells_48eaec66.zip If you want to do summaries for a hierarchical datasource, it woul dbe much easier to handle this requirement using a 3.3 GridGroupingControl.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon