?
Solved

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

Posted on 2011-02-16
2
Medium Priority
?
3,097 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

752 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