Solved

Help with ComponentOne's flexgrid.subtotal() function to create simple tree (vb.net)

Posted on 2011-02-16
2
2,984 Views
Last Modified: 2012-05-11
I have a simple datatable called myDatatable which looks something like this:

APPLES, GALA
APPLES, MACINTOSH
APPLES, GOLDEN
ORANGES, MANDARIN
ORANGES, DECORATIVE

I want to use ComponentOne's flexgrid to turn this into a tree.  Meaning the APPLES and ORANGES are each compressed to one line like:

+APPLES
+ORANGES

And clicking on the + will expand the tree.  I've read the flexgrid documentation and looked for examples.  It appears the following code will be the beginning of what I need.  Where I need help is with the Subtotal() line.... not sure how to structure it and I can't find relative examples.

myFlexgrid is already on my form and ready to use.  It's default state.  I haven't changed any properties.  myDatatable is already populated with two columns of text data.

myFlexgrid.DataSource = myDatatable
myFlexgrid.Tree.Column = 0  'I understand this will put the + in the first column.. right?
myFlexgrid.Tree.Style = TreeStyleFlags.Simple

'And now the line I'm not sure how to format
myFlexgrid.Subtotal(??????)

Open in new window


Any insights would be very much appreciated.  Thank you!
0
Comment
Question by:WestSoft
  • 2
2 Comments
 

Accepted Solution

by:
WestSoft earned 0 total points
Comment Utility
I found the answer to my own question.

The answer is really to use the c1flexgrid.Subtotal.AggregateEnum function.

In my case, the answer was something similar to:

myFlexgrid.Subtotal(AggregateEnum.None, 0, 1, 0, "{0}")

Open in new window


For future users with this question, just review ComponentOne's FlexGrid documentation and search for the AggregateEnum option.  That answers questions on how to convert a Flexgrid to a simple tree.  You won't find any real answers under the Subtotal documentation.
0
 

Author Closing Comment

by:WestSoft
Comment Utility
This can be closed without assigning any points.  I answered it myself.  The information herein may be useful to other future users.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now