The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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.
ADAdministrator Syncfusion Team 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
ADAdministrator Syncfusion Team 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.