Solved

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

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ModalPopup  question 22 56
how to remove error in database 6 55
Eclipse integration with Github giving error 3 53
Background worker passing messagebox yes no 13 25
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.
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?
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…

734 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