Solved

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

Posted on 2011-02-16
2
3,010 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
ID: 34912255
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
ID: 34912259
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

910 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

19 Experts available now in Live!

Get 1:1 Help Now