I would like to have a tree like node within a grid. I need to use the Grid rather than the tree because filtering is required. How can I configure the grid to look soimething like this
customer
documentType1
doc1
doc2
documentType 2
doc3
doc4
OK - that was the it. I had to add this code into the InitializeGroupByRow event for the grid
If e.Row.Band.Key = "document" Then
e.Row.Expanded = True
e.Row.Description = e.Row.Rows(0).Cells("DocTypeDescription").Text
End If
Thanks
Okay. Groups and Levels is something different than OutlookGroupBy. It sounds like you are using OutlookGroupBy here. But that's not what you want, either, if I understand you correctly.
It seems like all you need to do is turn on AllowCellMerging on the Documents band and then sort that band by the Document type.
Oops. Maybe I got that backward. Upon reading this again, it looks like you DO want to use OutlookGroupBy on the Documents band so that the documents are broken up under the customer by type. So what you would do in code is something like:
documentsBand.SortedColumns.Add("DocumentType", false, true)
You will also need to set the grid.DisplayLayout.ViewStyleBand to OutlookGroupBy for this to work.
By merge I meant the feature in the grid that suppresses duplicate values in one row after the next - it merges it into one cell.
The source for the grid is a view in a database. Customer is a table an it has a related documents table which is the child band. My concern is the format of the document band.
I want the documents to appear grouped by type with the document description and date listed indented under each group type
Hmm, you kinda lost me there. I'm not sure what you mean by "merge" or exactly what you are trying to achieve here.And what do Groups and Levels have to do with it?I don't see any groups or levels in any of the diagrams you show here.
Perhaps I misunderstood the original question, but I assumed you were binding the grid to a hierarchical data source. It's starting to look like maybe you are binding the grid to a flat table, though, and you want to create a hierarchy from it.
I have it basically working that way; however I have a display issue. When I try to move the columns to two rows it does not merge the values between rows
In my grid I have
- Customer 1
DocType1 DocDescription1a
DocDescription1b
DocDescription1c
DocType2 DocDescription2a
DocDescription2b
+ Customer 2
+ Customer 3
I would like to have:
DocType1
DocDescription1a
DocType2
DocDescription2a
When I use Groups or Levels to make the row like this the merge no longer merge and I get this:
I think I am using groups and/or levels incorrectly. Any suggestions?