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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Total Row in Hierachical view using GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

28582 May 4,2005 10:35 PM UTC May 5,2005 12:33 AM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 4, 2005 10:35 PM UTC

I am using GDBG to display information a Hierarchical manner. There are three level of information in my grid. Let’s say Level A …………………. Level AB Value b1 ………………………. Level AC value c1 ………………………. Level AC value c2 ………………………. Level AC value c3 ………………………. Level AC value c4 …………………. Level AB Value b2 …………………. Level AB Value b3 …………………. Level AB Value b4 Level B …………………. Level BB Value b1 ………………………. Level BC value c1 ………………………. Level BC value c2 ………………………. Level BC value c3 ………………………. Level BC value c4 …………………. Level BB Value b2 …………………. Level BB Value b3 …………………. Level BB Value b4 Everything is fine up to this point. Now I have to show the total row at 2nd and 3rd level. Something like Level A …………………. Level AB Value b1 ………………………. Level AC value c1 ………………………. Level AC value c2 ………………………. Level AC value c3 ………………………. Level AC value c4 ………………………...Total Sum(c1+c2+c3+c4) …………………. Level AB Value b2 …………………. Level AB Value b3 …………………. Level AB Value b4 …………………. Total Sum(b1+b2+b3+b4) Level B …………………. Level BB Value b1 ………………………. Level BC value c1 ………………………. Level BC value c2 ………………………. Level BC value c3 ………………………. Level BC value c4 ………………………...Total Sum(c1+c2+c3+c4) …………………. Level BB Value b2 …………………. Level BB Value b3 …………………. Level BB Value b4 …………………. Total Sum(b1+b2+b3+b4) I have no idea how to do it. Should I add one extract row in my data table at 2nd and 3rd level and somehow find that row and do the formatting like making them BOLD. Is there any better way to do it? If there is a sample, please point me to that. Thanks, VS

Administrator [Syncfusion]
Replied On May 4, 2005 11:01 PM UTC

If you need to display hierarchical data with summary information, you might consider using a GridGroupingControl as this control is designed to do this. The GridDataBoundGrid is not designed to do this. If you want to try to do this with a GriddataBoundGrid, then the simplest way to do this is to add an fake row to end of the child table(s) where you want the summary. Then you can handle the grid.Model.QueryCellInfo event to dynamically populate this row if you need to populate it dynamically.

Administrator [Syncfusion]
Replied On May 4, 2005 11:18 PM UTC

clay, Q#1 Is there a sample available for GridGroupingControl doing that? Q#2 What is the main difference between GridGroupingControl and GridDataBoundGrid control? Do we use same concept of data table and "Relation" in order to show information in Hierarchical view? Thanks, VS

Administrator [Syncfusion]
Replied On May 5, 2005 12:33 AM UTC

1) The GridGrouping tutorial in the grid user guide steps you through adding summary rows using the designer. This forum thread has a sample doing the same directly in code. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=20259 The \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\HierarchySample sample adds a summary row to hierarchical data. 2)The GridGroupingControl uses its own engine class to manage grouping, sorting, filtering and summaries. It does not rely on ADO.NET DataView''s to do so. You can use DataSet, Datatables and DataSet.Relations to populate the grouping control. This is illustrated in the HierarchySample sample.

CONFIRMATION

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.

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

;