At the risk of being downmodded, I want to ask what the best mechanism (best is obviously subjective for the practice violation inherent here) for viewing data from a table, using C#, with a lot of columns. By a lot, I mean something like 1000.
Now before you get all click happy, or throw out responses like "why the hell would you ever have a table with that many columns" let me say that it's actually part of a design requirement. We are collecting data as fast as we can from 1000 data points. We need to store these as fast as possible, hence the flat table. The data needs to be directly accessible from SQL Server, hence the database (we're using SQL Compact with table-direct).
So let's forget, for now, all that we've learned about proper database design, the rules of normalization, etc. and just focus on the fact that I have a table with 1000 columns and I want to be able to display the data on screen to verify that the data is actually going in there.
I've tried a data grid. It pukes because (not surprisingly) it's not designed to handle that many columns.
I've tried using the viewer in Studio. It pukes after 256, plus the end user won't have Studio installed anyway.
For now the result need not be pretty, it need not be updateable, nor does it need to be sensitive to data changes - just a static snapshot of data in the table at a given point in time.
Relevant (or semi-relevant) info:
Select names of tables in the grid, then right-click and select Display Rows from the shortcut menu, or select Display Rows from the File menu. You can use ctrl or shift to select more than one table name, or use the Select All and Invert Selection options on the Edit menu or the grid shortcut menu.
2 Answers. Show activity on this post. According to the MySQL 5.7 reference manual, there is a maximum of 4096 columns per table.
Each tab contains two columns and various rows. To create a column in the Design View, click an empty cell under Field Name and type the desired name. To change the name of an existing column, double-click its name in the Field Name column to select it and type the desired name.
If you're going to implement your own custom user control, you could do a Fisheye Grid like this:
Dead image link
This example shows a full-size 3x4 panel moving around within a 9x10 table. Since (I assume) you don't need to edit this data, the UI could just be something where the user grabs the panel and drags it around. If you're really masochistic and/or have lots of free time, you can even have multiple fisheye panels on the same grid, allowing you to compare one or more regions of the grid simultaneously.
Update: Silverlight has one of these, apparently. Sort of.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With