Hi all!
I coulnd find anything about, how to create a WinGrid with a expand feature (like a tree), editable in all lines like this:
A B C TOTAL1 TOTAL2 (Columns Summary - Header's of Document) + RowMaster | --- Z X C (Columns Explaing Total1 - Some lines of this Document) --- Row1 --- Row2 etc..
| --- P Q R (Columns Explaing Total2 - Some lines of this Document) --- Row3 --- Row4 etc..
Like this http://img201.imageshack.us/img201/7899/imagem1be.png but with another band in the bottom.
Can someone guide me how to obtain such effect.
Have to be with a SQL result, a script, proprieties, group by, how ? Is there a sample?
Thank you so much!Regards Core
Hi Core,
Here's a good place to start:
Accessing Data
Done!
Simple Answer:
Use SQL to get all records than add two Relations on the DataSet, WinGrid will create parent's and child's rows automatically.
Code Vb.Net:
Private ds As New DataSet
Private dtLinhas As New DataTable
Private dtServEsp As New DataTable
Private dtDescontos As New DataTable
ds.Tables.Add(dtLinhas) ' Parentsds.Tables.Add(dtServEsp) ' Childsds.Tables.Add(dtDescontos) ' Childs
ds.Relations.Add(dtLinhas.Columns("Linha"), dtServEsp.Columns("Linha"))ds.Relations.Add(dtLinhas.Columns("Linha"), dtDescontos.Columns("Linha"))
ManifestoGrid.DataSource = ds