Solved

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

Posted on 2011-02-16
2
3,052 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

762 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