I know how to handle multi-dimensional arrays, but whats the best way to represent them on a form??

Not sure how best to describe the problem : / Its an order form. Each row represents a product, each column represents the week we're ordering for. The problem is the order is split between different departments so each cell needs a third axis to allow multiple values. eg:
Week 4 : Week 6
Product A : Dept1 = 10 Dept2 = 12 : Dept1 = 10 Dept2 = 12

I considered having a column for each department, but im not sure how to give a group of column headings a super-heading. Also, the number of departments is variable so this solution gets very messy when theres more than a couple of departments...its gonna be a veeeeeery wide form : /

Anyone got any ideas? Ihave no idea how to add a z-axis to a datagridview :p

7 Years
Discussion Span
Last Post by Geekitygeek

Hello, Ryshad.
I hope that I understood you corretcly :)
What if take your 3rd dimension out of gridview? (see pic 1).

If you have to display a few orders, that are split between different departments, and having different data about weeks and products - you can also take it outside gridview. E.g. creating something like on 2nd pic.

Hope, that this would help you :)

Attachments ExampleForm.JPG 16.43 KB ExampleMainForm.JPG 6.48 KB

Or even a dropdown TreeView connected to a TabControl that drives the tab page selection based on the level of drill-down...


Or if you really need to puch them into a single table:
maybe moove weeks in rows, like:

[B]Product Name |  Weeks  |  Dept. 1 | Dept. 2| ...[/B]
Product 1    |  Week1  |  someth. | someth.| ...
             |  Week2  |  someth. | someth.| ...
             |  Week3  |  someth. | someth.| ...
Product 2    |  Week1  |  someth. | someth.| ...
             |  Week3  |  someth. | someth.| ...
             |  Week7  |  someth. | someth.| ...

Or maybe merge 2 cols/rows in 1, e.g.:

[B]Product Name |  Dept. 1         |  Dept. 2        | ...[/B]
Product 1    |  Week1 (someth.),| Week1 (someth.),| ...
             |  Week2 (someth.),| Week2 (someth.),| ...
             |  Week3 (someth.) | Week3 (someth.) | ...
Product 2    |  Week1 (someth.),| Week2 (someth.),|  ...
             |  Week3 (someth.),| Week5 (someth.),| ...
             |  Week7 (someth.) | Week1 (someth.) | ...

Wow, thanks for all the great suggestions guys
Sorry i havent replied, been workin my ass of at work this afternoon :p
I've gone down the road ddoubled suggested and taken the third dimension out of the gridview.
When you click on a cell it opens a control (tooltip-style) on top of the gridview with a table to enter a value under each department. Then through in a combobox to toggle the main datagridview between showing single department values or a total of all departments.

The problem now is making it completely boss-proof : /

I was hoping there would be some simple feature i had yet to learn about but i guess not :p Thanks again for the pointers

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.