查看包含* lot *列的表的最佳方法?

时间:2022-07-14 22:26:21

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.

冒着被降级的风险,我想问一下,使用C#,从很多列中查看表中数据的最佳机制(最好对于此处固有的实践违规显然是主观的)。很多,我的意思是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).

现在,在你点击所有点击开心之前,或者抛出一些回答,比如“你为什么会有一张包含那么多列的桌子”,让我说它实际上是设计要求的一部分。我们正在从1000个数据点尽快收集数据。我们需要尽可能快地存储这些,因此平台。数据需要直接从SQL Server访问,因此数据库(我们使用带有table-direct的SQL Compact)。

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.

所以,让我们暂时忘记我们所学到的关于正确数据库设计,规范化规则等的所有内容,并且只关注我有一个包含1000列的表的事实,并且我希望能够显示数据屏幕以验证数据实际进入那里。

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.

我试过在Studio中使用查看器。它在256之后呕吐,加上最终用户无论如何都不会安装Studio。

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:

相关(或半相关)信息:

  • Table has 1000 columns (read above before getting click happy)
  • 表有1000列(在点击之前阅读上面的内容)
  • Using SQL Compact version 3.5
  • 使用SQL Compact版本3.5
  • Running on the desktop
  • 在桌面上运行
  • Looking for a managed-code answer
  • 寻找托管代码的答案

21 个解决方案

#1


15  

If you're going to implement your own custom user control, you could do a Fisheye Grid like this:

如果您要实现自己的自定义用户控件,可以像这样执行Fisheye Grid:

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.

此示例显示了在9x10表格中移动的全尺寸3x4面板。由于(我假设)您不需要编辑此数据,因此UI可能只是用户抓取面板并拖动它的东西。如果你真的是自虐和/或有很多空闲时间,你甚至可以在同一个网格上有多个鱼眼面板,让你可以同时比较网格的一个或多个区域。

Update: Silverlight has one of these, apparently. Sort of.

更新:显然,Silverlight有其中一个。有点。

#2


14  

You could format all numbers as n-character strings with spaces and then display them in a fixed width font.

您可以将所有数字格式化为带有空格的n字符字符串,然后以固定宽度字体显示它们。

1       2       3       4       6      36     436    6346
2       3       4       6      36     436    6346       0
3       4       6      36     436    6346       3       4
4       6      36     436    6346     333     222     334

#3


12  

Ok, what turned out to be the right answer for me was to use the ReportViewer control, but not in any manner documented in MSDN. The problem is that I have dynamic data, so I need a dynamic report, and all of the tutorials, etc. seem to assume you have the luxury of knowing everything at design time so you can point and click your way through a Wizard.

好吧,对我来说最合适的答案是使用ReportViewer控件,但不能以MSDN中记录的任何方式使用。问题是我有动态数据,因此我需要一个动态报告,并且所有教程等似乎都假设您可以在设计时了解所有内容,因此您可以通过向导指向并单击您的方式。

The solution ended up requiring a couple pieces. First, I had to create code to dynamically generate the RDLC that the ReportViewer uses to describe the report layout and what data fields map to what. This is what I came up with:

解决方案最终需要几件。首先,我必须创建代码来动态生成RDLC,ReportViewer用它来描述报告布局以及哪些数据字段映射到什么。这就是我提出的:

public static Stream BuildRDLCStream(
    DataSet data, string name, string reportXslPath)
{
  using (MemoryStream schemaStream = new MemoryStream())
  {
    // save the schema to a stream
    data.WriteXmlSchema(schemaStream);
    schemaStream.Seek(0, SeekOrigin.Begin);

    // load it into a Document and set the Name variable
    XmlDocument xmlDomSchema = new XmlDocument();
    xmlDomSchema.Load(schemaStream);        
    xmlDomSchema.DocumentElement.SetAttribute("Name", data.DataSetName);

    // load the report's XSL file (that's the magic)
    XslCompiledTransform xform = new XslCompiledTransform();
    xform.Load(reportXslPath);

    // do the transform
    MemoryStream rdlcStream = new MemoryStream();
    XmlWriter writer = XmlWriter.Create(rdlcStream);
    xform.Transform(xmlDomSchema, writer);
    writer.Close();
    rdlcStream.Seek(0, SeekOrigin.Begin);

    // send back the RDLC
    return rdlcStream;
  }
}

The second piece is an XSL file that I took right off of Dan Shipe's blog. The RDLC code there was pretty worthless as it was all intended for Web use, but the XSL is pure gold. I've put it at the bottom of this post for completeness in case that blog ever goes offline.

第二部分是我从Dan Shipe的博客中获取的XSL文件。那里的RDLC代码非常没用,因为它全部用于Web使用,但XSL是纯金。我已经把它放在这篇文章的底部,以便在博客离线的情况下完整。

Once I has those two pieces, it was simply a matter of creating a Form with a ReportViewer control on it, then using this bit of code to set it up:

一旦我有了这两个部分,只需要创建一个带有ReportViewer控件的Form,然后使用这段代码进行设置:

ds.DataSetName = name;

Stream rdlc = RdlcEngine.BuildRDLCStream(
    ds, name, "c:\\temp\\rdlc\\report.xsl");

reportView.LocalReport.LoadReportDefinition(rdlc);
reportView.LocalReport.DataSources.Clear();
reportView.LocalReport.DataSources.Add(
    new ReportDataSource(ds.DataSetName, ds.Tables[0]));
reportView.RefreshReport();

The key here is that 'ds' is a DataSet object with a single DataTable in it with the data to be displayed.

这里的关键是'ds'是一个DataSet对象,其中包含一个DataTable,其中包含要显示的数据。

Again, for completeness, here's the XSL - sorry about the size:

同样,为了完整性,这里是XSL - 抱歉大小:

    <?xml version="1.0"?>
    <!-- Stylesheet for creating ReportViewer RDLC documents -->
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
      xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"  xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
      >

     <xsl:variable name="mvarName" select="/xs:schema/@Name"/>
     <xsl:variable name="mvarFontSize">8pt</xsl:variable>
     <xsl:variable name="mvarFontWeight">500</xsl:variable>
     <xsl:variable name="mvarFontWeightBold">700</xsl:variable>


     <xsl:template match="/">
      <xsl:apply-templates select="/xs:schema/xs:element/xs:complexType/xs:choice/xs:element/xs:complexType/xs:sequence">
      </xsl:apply-templates>
     </xsl:template>

     <xsl:template match="xs:sequence">
      <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition">
       <BottomMargin>1in</BottomMargin>
       <RightMargin>1in</RightMargin>
       <LeftMargin>1in</LeftMargin>
       <TopMargin>1in</TopMargin>
       <InteractiveHeight>11in</InteractiveHeight>
       <InteractiveWidth>8.5in</InteractiveWidth>
       <Width>6.5in</Width>
       <Language>en-US</Language>
       <rd:DrawGrid>true</rd:DrawGrid>
       <rd:SnapToGrid>true</rd:SnapToGrid>
       <rd:ReportID>7358b654-3ca3-44a0-8677-efe0a55c7c45</rd:ReportID>

       <xsl:call-template name="BuildDataSource">
       </xsl:call-template>

       <xsl:call-template name="BuildDataSet">
       </xsl:call-template>

       <Body>
        <Height>0.50in</Height>
        <ReportItems>
         <Table Name="table1">
          <DataSetName><xsl:value-of select="$mvarName" /></DataSetName>
          <Top>0.5in</Top>
          <Height>0.50in</Height>
          <Header>
           <TableRows>
            <TableRow>
             <Height>0.25in</Height>
             <TableCells>

              <xsl:apply-templates select="xs:element" mode="HeaderTableCell">
              </xsl:apply-templates>

             </TableCells>
            </TableRow>
           </TableRows>
          </Header>
          <Details>
           <TableRows>
            <TableRow>
             <Height>0.25in</Height>
             <TableCells>

              <xsl:apply-templates select="xs:element" mode="DetailTableCell">
              </xsl:apply-templates>

             </TableCells>
            </TableRow>
           </TableRows>
          </Details>
          <TableColumns>

           <xsl:apply-templates select="xs:element" mode="TableColumn">
           </xsl:apply-templates>

          </TableColumns>
         </Table>
        </ReportItems>
       </Body>
      </Report>
     </xsl:template>

     <xsl:template name="BuildDataSource">
      <DataSources>
       <DataSource Name="DummyDataSource">
        <ConnectionProperties>
         <ConnectString/>
         <DataProvider>SQL</DataProvider>
        </ConnectionProperties>
        <rd:DataSourceID>84635ff8-d177-4a25-9aa5-5a921652c79c</rd:DataSourceID>
       </DataSource>
      </DataSources>
     </xsl:template>

     <xsl:template name="BuildDataSet">
      <DataSets>
       <DataSet Name="{$mvarName}">
        <Query>
         <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
         <CommandText/>
         <DataSourceName>DummyDataSource</DataSourceName>
        </Query>
        <Fields>

         <xsl:apply-templates select="xs:element" mode="Field">
         </xsl:apply-templates>

        </Fields>
       </DataSet>
      </DataSets>
     </xsl:template>

     <xsl:template match="xs:element" mode="Field">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <xsl:variable name="varDataType">
       <xsl:choose>
        <xsl:when test="@type='xs:int'">System.Int32</xsl:when>
        <xsl:when test="@type='xs:string'">System.String</xsl:when>
        <xsl:when test="@type='xs:dateTime'">System.DateTime</xsl:when>
        <xsl:when test="@type='xs:boolean'">System.Boolean</xsl:when>
       </xsl:choose>
      </xsl:variable>

      <Field Name="{$varFieldName}">
       <rd:TypeName><xsl:value-of select="$varDataType"/></rd:TypeName>
       <DataField><xsl:value-of select="$varFieldName"/></DataField>
      </Field>
     </xsl:template>

     <xsl:template match="xs:element" mode="HeaderTableCell">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <TableCell>
       <ReportItems>
        <Textbox Name="textbox{position()}">
         <rd:DefaultName>textbox<xsl:value-of select="position()"/>
         </rd:DefaultName>
         <Value><xsl:value-of select="$varFieldName"/></Value>
         <CanGrow>true</CanGrow>
         <ZIndex>7</ZIndex>
         <Style>
          <TextAlign>Center</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <FontSize><xsl:value-of select="$mvarFontSize"/></FontSize> 
          <FontWeight><xsl:value-of select="$mvarFontWeightBold"/></FontWeight> 
          <BackgroundColor>#000000</BackgroundColor> 
          <Color>#ffffff</Color>
          <BorderColor>
           <Default>#ffffff</Default>
          </BorderColor>
          <BorderStyle>
           <Default>Solid</Default>
          </BorderStyle>
         </Style>
        </Textbox>
       </ReportItems>
      </TableCell>
     </xsl:template>

     <xsl:template match="xs:element" mode="DetailTableCell">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <TableCell>
       <ReportItems>
        <Textbox Name="{$varFieldName}">
         <rd:DefaultName><xsl:value-of select="$varFieldName"/></rd:DefaultName>
         <Value>=Fields!<xsl:value-of select="$varFieldName"/>.Value</Value>
         <CanGrow>true</CanGrow>
         <ZIndex>7</ZIndex>
         <Style>
          <TextAlign>Left</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <FontSize><xsl:value-of select="$mvarFontSize"/></FontSize> 
          <FontWeight><xsl:value-of select="$mvarFontWeight"/></FontWeight> 
          <BackgroundColor>#e0e0e0</BackgroundColor> 
          <Color>#000000</Color> 
          <BorderColor>
           <Default>#ffffff</Default> 
          </BorderColor>
          <BorderStyle>
            <Default>Solid</Default>
          </BorderStyle>
         </Style>
        </Textbox>
       </ReportItems>
      </TableCell>
     </xsl:template>

     <xsl:template match="xs:element" mode="TableColumn">
      <TableColumn>
       <Width>0.75in</Width>
      </TableColumn>
     </xsl:template>

     <xsl:template name="replace-string">
      <xsl:param name="text"/>
      <xsl:param name="from"/>
      <xsl:param name="to"/>
      <xsl:choose>
       <xsl:when test="contains($text, $from)">
        <xsl:variable name="before" select="substring-before($text, $from)"/>
        <xsl:variable name="after" select="substring-after($text, $from)"/>
        <xsl:variable name="prefix" select="concat($before, $to)"/>
        <xsl:value-of select="$before"/>
        <xsl:value-of select="$to"/>
        <xsl:call-template name="replace-string">
         <xsl:with-param name="text" select="$after"/>
         <xsl:with-param name="from" select="$from"/>
         <xsl:with-param name="to" select="$to"/>
        </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
        <xsl:value-of select="$text"/>
       </xsl:otherwise>
      </xsl:choose>
     </xsl:template>
    </xsl:stylesheet>

#4


6  

What about storing the data in a csv file, which would give you options for viewing. If your user has excel or Open Office Calc, they could easily import the data (not sure if there is a column limit on Calc, but excel 2007 can hold 16384 columns) and view it through that program?

如何将数据存储在csv文件中,这将为您提供查看选项。如果您的用户有Excel或Open Office Calc,他们可以轻松导入数据(不确定Calc是否有列限制,但excel 2007可以容纳16384列)并通过该程序查看它?

#5


3  

do you need to view multiple rows on a single table?

你需要在一张桌子上查看多行吗?

my guess is that this data is numerical, is there any way you could display a single rows data as a 20*50 grid or something like that, then just paginate through the rows?

我的猜测是这个数据是数字的,有没有什么方法可以将单行数据显示为20 * 50网格或类似的东西,然后只是通过行分页?

Eg, row 1, column 1 = colum 1 of the database, row 2, column 1 = column 21 of the database, etc

例如,第1行,第1列=数据库的第1列,第2行,第1列=数据库的第21列等

Id = 1
     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
----|--------------------------------------------------------
  0 |  
 20 |  
 40 |
 60 |
 80 |
100 |
120 |
etc |

#6


2  

try a html table with a very tiny font

尝试使用非常小的字体的html表

if you're concerned about formatting the table use CSS:

如果你担心格式化表使用CSS:

td { font-size: 0.2em; text-align: right; }

alternately, if all your numbers are the same size, you could also just generate a "wall of numbers" display, e.g. use a fixed-width font and display columns 5 characters wide in a scrolling panel

或者,如果你的所有数字都是相同的大小,你也可以只生成一个“数字墙”显示,例如使用固定宽度的字体并在滚动面板中显示5个字符宽的列

#7


1  

It depends a bit on how pretty it needs to be. If this is just a debug/spot check tool, you could put several DataGrids side by side, each one displaying a selection of columns. Would be kind of ugly, but would be workable.

这取决于它需要多么漂亮。如果这只是一个调试/点检查工具,你可以并排放置几个DataGrids,每个DataGrids都显示一列选择。会有点丑,但是可​​行的。

OTOH, if you need a semi-polished tool, you might want to come up with a custom control to handle it. Basically, you would load the section of the database being viewed, with a bit of buffer, and when the user scrolled off the currently loaded data, run a new query.

OTOH,如果你需要一个半抛光工具,你可能想要一个自定义控件来处理它。基本上,您将使用一些缓冲区加载正在查看的数据库部分,当用户滚动当前加载的数据时,运行新查询。

#8


1  

A DataGrid (or even a ListView) should be able to handle a table with 32 columns and 32 rows, which would allow you to display an entire DB row's worth of data at once. This would allow you to instantly see whether some cells were missing data or not.

DataGrid(甚至是ListView)应该能够处理一个包含32列和32行的表,这样您就可以一次显示整个数据库行的数据。这将允许您立即查看某些单元格是否缺少数据。

#9


0  

I feel dirty even for suggesting this, but you could do something along the lines of:

即使提出这个问题我也觉得很脏,但你可以做一些事情:

SELECT Field1 + ' - ' + Field2 + ... AS EvilMegaColumn FROM Table

but really I think this falls into the category of "if you're running into this limitation, you're doing something wrong". I really can't see any reason, speed or otherwise to need 1000 columns...

但实际上我认为这属于“如果你遇到这个限制,你做错了什么”的类别。我真的看不出任何理由,速度或其他需要1000列......

#10


0  

Who will read a 1000 column table??? Try to think of way to filter or visualize the data.

谁会读1000列表???试着想办法过滤或可视化数据。

#11


0  

Perhaps you should investigate a different type of database. I've heard column-oriented databases are good for this sort of thing (whereas a typical RDBMS is row-oriented). Also, if you won't be going back to update rows after they're first inserted, maybe a binary flat file would be better than a giant table?

也许你应该研究一种不同类型的数据库。我听说面向列的数据库很适合这种事情(而典型的RDBMS是面向行的)。此外,如果您在第一次插入后不再返回更新行,那么二进制平面文件可能比巨型表更好吗?

#12


0  

I would make this a drill-down. In the first page (or at the top of the page) you would have controls that select the row. In the next page (or at the bottom of the page) you would display the data from the selected row. Depending on the required cell width, you might do this as 100 rows of 10 columns, or 1000 rows of 1 column, for example.

我会把它作为深入研究。在第一页(或页面顶部),您将拥有选择行的控件。在下一页(或页面底部)中,您将显示所选行中的数据。根据所需的单元格宽度,您可以将此操作分为100行10列,或1000行1列。

This would be fairly easy to do as dynamic client-side javascript -- you could even make it editable this way. I'm not sure how this would work in C#.

这可以很容易地做为动态客户端javascript - 您甚至可以通过这种方式使其可编辑。我不确定这在C#中是如何工作的。

#13


0  

If you are just after a verification could you not check each field programatically and report that entire row is ok!. Then you need a much simple data grid which lists the rows that are not so good.

如果您刚刚进行验证,则无法以编程方式检查每个字段并报告整行是正常的!然后你需要一个非常简单的数据网格,列出不太好的行。

They can then be examined by whatever technique you can apply to a single row as you will not need to browse the fields in most cases. I am assuming here that you can view the entire row somehow already and are after a way to browse several rows at the same time looking for missing data (automating this will make it much more reliable).

然后可以通过您可以应用于单行的任何技术来检查它们,因为在大多数情况下您不需要浏览字段。我在这里假设您可以以某种方式查看整行,并且正在寻找同时浏览多行以查找缺失数据的方法(自动化这将使其更加可靠)。

#14


0  

Coming at it from an oblique angle, I'd ask if the user needs to have all the columns "loaded" at one time?

从一个倾斜的角度来看,我会问用户是否需要一次“加载”所有列?

If the users would be happy to have a subset of columns displayed at once (say, 100 at a time, or specfic sets at a time), then I'd use a some kind of data grid (the built in one, or a ListView, or maybe a third party one) to display the subset, with a CheckedListView docked to the side, allowing the subset of interest to be displayed.

如果用户愿意一次显示一列子列(例如,一次显示100个列,或者一次显示一个特定的列),那么我将使用某种数据网格(内置的一个或一个ListView,或者可能是第三方)显示子集,CheckedListView停靠在一边,允许显示感兴趣的子集。

Alternatively, could you display some kind of summary data showing the count/average/xxx for groups of 100 columns?

或者,您是否可以显示某种摘要数据,显示100列组的计数/平均值/ xxx?

#15


0  

I would recommend investigating something other than a flat layout. In my experience, databases have restrictions on column counts and row byte sizes.

我建议调查除平面布局之外的其他东西。根据我的经验,数据库对列数和行字节大小有限制。

  • Your SQL may allow for 1000 columns to be defined.
  • 您的SQL可能允许定义1000列。
  • A SQL row cannot exceed the row byte limit.
  • SQL行不能超过行字节限制。

Each database implementation has a page size (4k / 8k), and a single row must fit within this data size. NULLs are typically freebies. This means that 1000 ints 1000 x 4 bytes will just fit within a 4k page size.

每个数据库实现都有一个页面大小(4k / 8k),并且单行必须符合此数据大小。 NULL通常是免费赠品。这意味着1000英寸1000 x 4字节将适合4k页面大小。

If you are talking data with varchars, then the problem is worse. How many characters are in each column? How many columns can be filled in? If you have 10 characters on average, and your page size is 8k, then you lose the data with a SQL error.

如果你正在与varchars谈论数据,那么问题就更糟了。每列中有多少个字符?可以填写多少列?如果平均有10个字符,并且页面大小为8k,那么您将丢失带有SQL错误的数据。

Laugh if you must, but this situation did occur with a particularly long winded typist in a flat datatable that I knew was pushing the limits.

如果你必须笑,但这种情况确实发生在一个特别长的蜿蜒打字员在一个平坦的数据表中,我知道正在推动极限。

#16


0  

.. to verify that the data is actually going in there.

..验证数据是否真正进入那里。

May be it is outdated, but you could use pixel map where single pixel is representing single cell of table (is screen is more then 1000) or 10 cells for one pixel with zoom region on click.

可能它已经过时了,但您可以使用像素图,其中单个像素表示表格的单个单元格(屏幕大于1000)或单个像素表示10个单元格,单击缩放区域。

The color of pixel will be data dependent. It could be black/white for empty/data. Or it could be color to show value grows or decrease with every row. Or red for sudden jumps of data. All anomalies you could catch normally with your eye in data grid.

像素的颜色将取决于数据。对于空/数据,它可以是黑/白。或者它可能是颜色显示值随着每一行增长或减少。或者红色表示突然跳转数据。您可以在数据网格中正常捕捉所有异常情况。

Then all you need is to catch click coordinates in the area of interest and use small table to show that part of table without any scrolling.

然后您需要的是捕获感兴趣区域中的点击坐标,并使用小表来显示表格的一部分而不进行任何滚动。

Just click to go back to pixel-map.

只需单击即可返回像素图。

#17


0  

Given that the user will have to scroll horizontally anyway, you could use a regular data grid showing a reasonable number of columns (say, 50). Then you have a horizontal scrollbar positioned under the grid that selects a subset of columns to show. When the scrollbar is at the left you show columns 1-50, when you click the right arrow you go to 2-51, etc.

鉴于用户无论如何都必须水平滚动,您可以使用显示合理数量的列(例如,50)的常规数据网格。然后,您在网格下方有一个水平滚动条,用于选择要显示的列的子集。当滚动条位于左侧时,您会显示1-50列,当您单击右箭头时,您会转到2-51,等等。

This gives you the scrolling capability without ever having to overload a grid control with data. While you would lose the ability to freely cursor around in the table or make large rectangular selections, it doesn't sound like that would be an issue for this application.

这为您提供了滚动功能,而无需使用数据重载网格控件。虽然您将失去在表格中*光标或进行大矩形选择的能力,但听起来不会是这个应用程序的问题。

#18


-1  

How much of the data is critical for the initial view? I can see doing something like a master/detail type grid where you're putting the critical columns (say like 10) onto the datagrid and when the user clicks to view the details, you can take the remaining columns and display them in a "properties area" or something in that regard.

有多少数据对初始视图至关重要?我可以看到做类似主/细节类型网格的事情,你将关键列(比如10)放到数据网格上,当用户点击查看详细信息时,你可以取剩下的列并将它们显示在“物业区“或在这方面的东西。

#19


-1  

If all you need is to make sure the data is being populated then why not have every column with a default value, say, 'void', 'blank', etc.

如果您只需确保填充数据,那么为什么不让每个列都具有默认值,例如'void','blank'等。

Then you can iterate through while counting non-default/total to show a percentage.

然后,您可以迭代计数非默认值/总计以显示百分比。

Now you can visualize the data completeness with a percentage value, maybe even record which columns had the default values (like to a list/array) for further investigation.

现在,您可以使用百分比值可视化数据完整性,甚至可以记录哪些列具有默认值(如列表/数组)以供进一步调查。

#20


-1  

You might consider checking with your user base and seeing what they really need to see, then set up views for each distinct need, in order to get the column count down.

您可以考虑与您的用户群一起检查并查看他们真正需要查看的内容,然后为每个不同的需求设置视图,以便减少列数。

Another option would be to read the data, and create a whopping big static set of html pages from it. Then you could invoke the browser from within your program to view it.

另一个选择是读取数据,并从中创建一个高大的静态html页面集。然后,您可以从程序中调用浏览器来查看它。

#21


-1  

Have a scrollable pane and show 10 columns at a time (these can be actively loaded or cached or whatever you need). When you are scrolled left, show the first ten. As you scroll right, show the latter sequence of columns. So all in all, only 10 columns are active at any given point. Trying to actually display 1000 columns would be nuts any other way in my opinion. PS: This is nothing more than an ideal guess; I'm not really sure if it's remotely possible.

有一个可滚动的窗格并一次显示10列(这些列可以主动加载或缓存,或者您需要的任何内容)。向左滚动时,显示前十个。向右滚动时,显示后面的列序列。总而言之,在任何给定点上只有10列有效。在我看来,尝试实际显示1000列将是任何其他方式。 PS:这只不过是一个理想的猜测;我不确定它是否可以远程实现。

#1


15  

If you're going to implement your own custom user control, you could do a Fisheye Grid like this:

如果您要实现自己的自定义用户控件,可以像这样执行Fisheye Grid:

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.

此示例显示了在9x10表格中移动的全尺寸3x4面板。由于(我假设)您不需要编辑此数据,因此UI可能只是用户抓取面板并拖动它的东西。如果你真的是自虐和/或有很多空闲时间,你甚至可以在同一个网格上有多个鱼眼面板,让你可以同时比较网格的一个或多个区域。

Update: Silverlight has one of these, apparently. Sort of.

更新:显然,Silverlight有其中一个。有点。

#2


14  

You could format all numbers as n-character strings with spaces and then display them in a fixed width font.

您可以将所有数字格式化为带有空格的n字符字符串,然后以固定宽度字体显示它们。

1       2       3       4       6      36     436    6346
2       3       4       6      36     436    6346       0
3       4       6      36     436    6346       3       4
4       6      36     436    6346     333     222     334

#3


12  

Ok, what turned out to be the right answer for me was to use the ReportViewer control, but not in any manner documented in MSDN. The problem is that I have dynamic data, so I need a dynamic report, and all of the tutorials, etc. seem to assume you have the luxury of knowing everything at design time so you can point and click your way through a Wizard.

好吧,对我来说最合适的答案是使用ReportViewer控件,但不能以MSDN中记录的任何方式使用。问题是我有动态数据,因此我需要一个动态报告,并且所有教程等似乎都假设您可以在设计时了解所有内容,因此您可以通过向导指向并单击您的方式。

The solution ended up requiring a couple pieces. First, I had to create code to dynamically generate the RDLC that the ReportViewer uses to describe the report layout and what data fields map to what. This is what I came up with:

解决方案最终需要几件。首先,我必须创建代码来动态生成RDLC,ReportViewer用它来描述报告布局以及哪些数据字段映射到什么。这就是我提出的:

public static Stream BuildRDLCStream(
    DataSet data, string name, string reportXslPath)
{
  using (MemoryStream schemaStream = new MemoryStream())
  {
    // save the schema to a stream
    data.WriteXmlSchema(schemaStream);
    schemaStream.Seek(0, SeekOrigin.Begin);

    // load it into a Document and set the Name variable
    XmlDocument xmlDomSchema = new XmlDocument();
    xmlDomSchema.Load(schemaStream);        
    xmlDomSchema.DocumentElement.SetAttribute("Name", data.DataSetName);

    // load the report's XSL file (that's the magic)
    XslCompiledTransform xform = new XslCompiledTransform();
    xform.Load(reportXslPath);

    // do the transform
    MemoryStream rdlcStream = new MemoryStream();
    XmlWriter writer = XmlWriter.Create(rdlcStream);
    xform.Transform(xmlDomSchema, writer);
    writer.Close();
    rdlcStream.Seek(0, SeekOrigin.Begin);

    // send back the RDLC
    return rdlcStream;
  }
}

The second piece is an XSL file that I took right off of Dan Shipe's blog. The RDLC code there was pretty worthless as it was all intended for Web use, but the XSL is pure gold. I've put it at the bottom of this post for completeness in case that blog ever goes offline.

第二部分是我从Dan Shipe的博客中获取的XSL文件。那里的RDLC代码非常没用,因为它全部用于Web使用,但XSL是纯金。我已经把它放在这篇文章的底部,以便在博客离线的情况下完整。

Once I has those two pieces, it was simply a matter of creating a Form with a ReportViewer control on it, then using this bit of code to set it up:

一旦我有了这两个部分,只需要创建一个带有ReportViewer控件的Form,然后使用这段代码进行设置:

ds.DataSetName = name;

Stream rdlc = RdlcEngine.BuildRDLCStream(
    ds, name, "c:\\temp\\rdlc\\report.xsl");

reportView.LocalReport.LoadReportDefinition(rdlc);
reportView.LocalReport.DataSources.Clear();
reportView.LocalReport.DataSources.Add(
    new ReportDataSource(ds.DataSetName, ds.Tables[0]));
reportView.RefreshReport();

The key here is that 'ds' is a DataSet object with a single DataTable in it with the data to be displayed.

这里的关键是'ds'是一个DataSet对象,其中包含一个DataTable,其中包含要显示的数据。

Again, for completeness, here's the XSL - sorry about the size:

同样,为了完整性,这里是XSL - 抱歉大小:

    <?xml version="1.0"?>
    <!-- Stylesheet for creating ReportViewer RDLC documents -->
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
      xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"  xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"
      >

     <xsl:variable name="mvarName" select="/xs:schema/@Name"/>
     <xsl:variable name="mvarFontSize">8pt</xsl:variable>
     <xsl:variable name="mvarFontWeight">500</xsl:variable>
     <xsl:variable name="mvarFontWeightBold">700</xsl:variable>


     <xsl:template match="/">
      <xsl:apply-templates select="/xs:schema/xs:element/xs:complexType/xs:choice/xs:element/xs:complexType/xs:sequence">
      </xsl:apply-templates>
     </xsl:template>

     <xsl:template match="xs:sequence">
      <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition">
       <BottomMargin>1in</BottomMargin>
       <RightMargin>1in</RightMargin>
       <LeftMargin>1in</LeftMargin>
       <TopMargin>1in</TopMargin>
       <InteractiveHeight>11in</InteractiveHeight>
       <InteractiveWidth>8.5in</InteractiveWidth>
       <Width>6.5in</Width>
       <Language>en-US</Language>
       <rd:DrawGrid>true</rd:DrawGrid>
       <rd:SnapToGrid>true</rd:SnapToGrid>
       <rd:ReportID>7358b654-3ca3-44a0-8677-efe0a55c7c45</rd:ReportID>

       <xsl:call-template name="BuildDataSource">
       </xsl:call-template>

       <xsl:call-template name="BuildDataSet">
       </xsl:call-template>

       <Body>
        <Height>0.50in</Height>
        <ReportItems>
         <Table Name="table1">
          <DataSetName><xsl:value-of select="$mvarName" /></DataSetName>
          <Top>0.5in</Top>
          <Height>0.50in</Height>
          <Header>
           <TableRows>
            <TableRow>
             <Height>0.25in</Height>
             <TableCells>

              <xsl:apply-templates select="xs:element" mode="HeaderTableCell">
              </xsl:apply-templates>

             </TableCells>
            </TableRow>
           </TableRows>
          </Header>
          <Details>
           <TableRows>
            <TableRow>
             <Height>0.25in</Height>
             <TableCells>

              <xsl:apply-templates select="xs:element" mode="DetailTableCell">
              </xsl:apply-templates>

             </TableCells>
            </TableRow>
           </TableRows>
          </Details>
          <TableColumns>

           <xsl:apply-templates select="xs:element" mode="TableColumn">
           </xsl:apply-templates>

          </TableColumns>
         </Table>
        </ReportItems>
       </Body>
      </Report>
     </xsl:template>

     <xsl:template name="BuildDataSource">
      <DataSources>
       <DataSource Name="DummyDataSource">
        <ConnectionProperties>
         <ConnectString/>
         <DataProvider>SQL</DataProvider>
        </ConnectionProperties>
        <rd:DataSourceID>84635ff8-d177-4a25-9aa5-5a921652c79c</rd:DataSourceID>
       </DataSource>
      </DataSources>
     </xsl:template>

     <xsl:template name="BuildDataSet">
      <DataSets>
       <DataSet Name="{$mvarName}">
        <Query>
         <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
         <CommandText/>
         <DataSourceName>DummyDataSource</DataSourceName>
        </Query>
        <Fields>

         <xsl:apply-templates select="xs:element" mode="Field">
         </xsl:apply-templates>

        </Fields>
       </DataSet>
      </DataSets>
     </xsl:template>

     <xsl:template match="xs:element" mode="Field">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <xsl:variable name="varDataType">
       <xsl:choose>
        <xsl:when test="@type='xs:int'">System.Int32</xsl:when>
        <xsl:when test="@type='xs:string'">System.String</xsl:when>
        <xsl:when test="@type='xs:dateTime'">System.DateTime</xsl:when>
        <xsl:when test="@type='xs:boolean'">System.Boolean</xsl:when>
       </xsl:choose>
      </xsl:variable>

      <Field Name="{$varFieldName}">
       <rd:TypeName><xsl:value-of select="$varDataType"/></rd:TypeName>
       <DataField><xsl:value-of select="$varFieldName"/></DataField>
      </Field>
     </xsl:template>

     <xsl:template match="xs:element" mode="HeaderTableCell">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <TableCell>
       <ReportItems>
        <Textbox Name="textbox{position()}">
         <rd:DefaultName>textbox<xsl:value-of select="position()"/>
         </rd:DefaultName>
         <Value><xsl:value-of select="$varFieldName"/></Value>
         <CanGrow>true</CanGrow>
         <ZIndex>7</ZIndex>
         <Style>
          <TextAlign>Center</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <FontSize><xsl:value-of select="$mvarFontSize"/></FontSize> 
          <FontWeight><xsl:value-of select="$mvarFontWeightBold"/></FontWeight> 
          <BackgroundColor>#000000</BackgroundColor> 
          <Color>#ffffff</Color>
          <BorderColor>
           <Default>#ffffff</Default>
          </BorderColor>
          <BorderStyle>
           <Default>Solid</Default>
          </BorderStyle>
         </Style>
        </Textbox>
       </ReportItems>
      </TableCell>
     </xsl:template>

     <xsl:template match="xs:element" mode="DetailTableCell">
      <xsl:variable name="varFieldName"> 
       <xsl:value-of select="@name" />
      </xsl:variable>

      <TableCell>
       <ReportItems>
        <Textbox Name="{$varFieldName}">
         <rd:DefaultName><xsl:value-of select="$varFieldName"/></rd:DefaultName>
         <Value>=Fields!<xsl:value-of select="$varFieldName"/>.Value</Value>
         <CanGrow>true</CanGrow>
         <ZIndex>7</ZIndex>
         <Style>
          <TextAlign>Left</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <FontSize><xsl:value-of select="$mvarFontSize"/></FontSize> 
          <FontWeight><xsl:value-of select="$mvarFontWeight"/></FontWeight> 
          <BackgroundColor>#e0e0e0</BackgroundColor> 
          <Color>#000000</Color> 
          <BorderColor>
           <Default>#ffffff</Default> 
          </BorderColor>
          <BorderStyle>
            <Default>Solid</Default>
          </BorderStyle>
         </Style>
        </Textbox>
       </ReportItems>
      </TableCell>
     </xsl:template>

     <xsl:template match="xs:element" mode="TableColumn">
      <TableColumn>
       <Width>0.75in</Width>
      </TableColumn>
     </xsl:template>

     <xsl:template name="replace-string">
      <xsl:param name="text"/>
      <xsl:param name="from"/>
      <xsl:param name="to"/>
      <xsl:choose>
       <xsl:when test="contains($text, $from)">
        <xsl:variable name="before" select="substring-before($text, $from)"/>
        <xsl:variable name="after" select="substring-after($text, $from)"/>
        <xsl:variable name="prefix" select="concat($before, $to)"/>
        <xsl:value-of select="$before"/>
        <xsl:value-of select="$to"/>
        <xsl:call-template name="replace-string">
         <xsl:with-param name="text" select="$after"/>
         <xsl:with-param name="from" select="$from"/>
         <xsl:with-param name="to" select="$to"/>
        </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
        <xsl:value-of select="$text"/>
       </xsl:otherwise>
      </xsl:choose>
     </xsl:template>
    </xsl:stylesheet>

#4


6  

What about storing the data in a csv file, which would give you options for viewing. If your user has excel or Open Office Calc, they could easily import the data (not sure if there is a column limit on Calc, but excel 2007 can hold 16384 columns) and view it through that program?

如何将数据存储在csv文件中,这将为您提供查看选项。如果您的用户有Excel或Open Office Calc,他们可以轻松导入数据(不确定Calc是否有列限制,但excel 2007可以容纳16384列)并通过该程序查看它?

#5


3  

do you need to view multiple rows on a single table?

你需要在一张桌子上查看多行吗?

my guess is that this data is numerical, is there any way you could display a single rows data as a 20*50 grid or something like that, then just paginate through the rows?

我的猜测是这个数据是数字的,有没有什么方法可以将单行数据显示为20 * 50网格或类似的东西,然后只是通过行分页?

Eg, row 1, column 1 = colum 1 of the database, row 2, column 1 = column 21 of the database, etc

例如,第1行,第1列=数据库的第1列,第2行,第1列=数据库的第21列等

Id = 1
     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
----|--------------------------------------------------------
  0 |  
 20 |  
 40 |
 60 |
 80 |
100 |
120 |
etc |

#6


2  

try a html table with a very tiny font

尝试使用非常小的字体的html表

if you're concerned about formatting the table use CSS:

如果你担心格式化表使用CSS:

td { font-size: 0.2em; text-align: right; }

alternately, if all your numbers are the same size, you could also just generate a "wall of numbers" display, e.g. use a fixed-width font and display columns 5 characters wide in a scrolling panel

或者,如果你的所有数字都是相同的大小,你也可以只生成一个“数字墙”显示,例如使用固定宽度的字体并在滚动面板中显示5个字符宽的列

#7


1  

It depends a bit on how pretty it needs to be. If this is just a debug/spot check tool, you could put several DataGrids side by side, each one displaying a selection of columns. Would be kind of ugly, but would be workable.

这取决于它需要多么漂亮。如果这只是一个调试/点检查工具,你可以并排放置几个DataGrids,每个DataGrids都显示一列选择。会有点丑,但是可​​行的。

OTOH, if you need a semi-polished tool, you might want to come up with a custom control to handle it. Basically, you would load the section of the database being viewed, with a bit of buffer, and when the user scrolled off the currently loaded data, run a new query.

OTOH,如果你需要一个半抛光工具,你可能想要一个自定义控件来处理它。基本上,您将使用一些缓冲区加载正在查看的数据库部分,当用户滚动当前加载的数据时,运行新查询。

#8


1  

A DataGrid (or even a ListView) should be able to handle a table with 32 columns and 32 rows, which would allow you to display an entire DB row's worth of data at once. This would allow you to instantly see whether some cells were missing data or not.

DataGrid(甚至是ListView)应该能够处理一个包含32列和32行的表,这样您就可以一次显示整个数据库行的数据。这将允许您立即查看某些单元格是否缺少数据。

#9


0  

I feel dirty even for suggesting this, but you could do something along the lines of:

即使提出这个问题我也觉得很脏,但你可以做一些事情:

SELECT Field1 + ' - ' + Field2 + ... AS EvilMegaColumn FROM Table

but really I think this falls into the category of "if you're running into this limitation, you're doing something wrong". I really can't see any reason, speed or otherwise to need 1000 columns...

但实际上我认为这属于“如果你遇到这个限制,你做错了什么”的类别。我真的看不出任何理由,速度或其他需要1000列......

#10


0  

Who will read a 1000 column table??? Try to think of way to filter or visualize the data.

谁会读1000列表???试着想办法过滤或可视化数据。

#11


0  

Perhaps you should investigate a different type of database. I've heard column-oriented databases are good for this sort of thing (whereas a typical RDBMS is row-oriented). Also, if you won't be going back to update rows after they're first inserted, maybe a binary flat file would be better than a giant table?

也许你应该研究一种不同类型的数据库。我听说面向列的数据库很适合这种事情(而典型的RDBMS是面向行的)。此外,如果您在第一次插入后不再返回更新行,那么二进制平面文件可能比巨型表更好吗?

#12


0  

I would make this a drill-down. In the first page (or at the top of the page) you would have controls that select the row. In the next page (or at the bottom of the page) you would display the data from the selected row. Depending on the required cell width, you might do this as 100 rows of 10 columns, or 1000 rows of 1 column, for example.

我会把它作为深入研究。在第一页(或页面顶部),您将拥有选择行的控件。在下一页(或页面底部)中,您将显示所选行中的数据。根据所需的单元格宽度,您可以将此操作分为100行10列,或1000行1列。

This would be fairly easy to do as dynamic client-side javascript -- you could even make it editable this way. I'm not sure how this would work in C#.

这可以很容易地做为动态客户端javascript - 您甚至可以通过这种方式使其可编辑。我不确定这在C#中是如何工作的。

#13


0  

If you are just after a verification could you not check each field programatically and report that entire row is ok!. Then you need a much simple data grid which lists the rows that are not so good.

如果您刚刚进行验证,则无法以编程方式检查每个字段并报告整行是正常的!然后你需要一个非常简单的数据网格,列出不太好的行。

They can then be examined by whatever technique you can apply to a single row as you will not need to browse the fields in most cases. I am assuming here that you can view the entire row somehow already and are after a way to browse several rows at the same time looking for missing data (automating this will make it much more reliable).

然后可以通过您可以应用于单行的任何技术来检查它们,因为在大多数情况下您不需要浏览字段。我在这里假设您可以以某种方式查看整行,并且正在寻找同时浏览多行以查找缺失数据的方法(自动化这将使其更加可靠)。

#14


0  

Coming at it from an oblique angle, I'd ask if the user needs to have all the columns "loaded" at one time?

从一个倾斜的角度来看,我会问用户是否需要一次“加载”所有列?

If the users would be happy to have a subset of columns displayed at once (say, 100 at a time, or specfic sets at a time), then I'd use a some kind of data grid (the built in one, or a ListView, or maybe a third party one) to display the subset, with a CheckedListView docked to the side, allowing the subset of interest to be displayed.

如果用户愿意一次显示一列子列(例如,一次显示100个列,或者一次显示一个特定的列),那么我将使用某种数据网格(内置的一个或一个ListView,或者可能是第三方)显示子集,CheckedListView停靠在一边,允许显示感兴趣的子集。

Alternatively, could you display some kind of summary data showing the count/average/xxx for groups of 100 columns?

或者,您是否可以显示某种摘要数据,显示100列组的计数/平均值/ xxx?

#15


0  

I would recommend investigating something other than a flat layout. In my experience, databases have restrictions on column counts and row byte sizes.

我建议调查除平面布局之外的其他东西。根据我的经验,数据库对列数和行字节大小有限制。

  • Your SQL may allow for 1000 columns to be defined.
  • 您的SQL可能允许定义1000列。
  • A SQL row cannot exceed the row byte limit.
  • SQL行不能超过行字节限制。

Each database implementation has a page size (4k / 8k), and a single row must fit within this data size. NULLs are typically freebies. This means that 1000 ints 1000 x 4 bytes will just fit within a 4k page size.

每个数据库实现都有一个页面大小(4k / 8k),并且单行必须符合此数据大小。 NULL通常是免费赠品。这意味着1000英寸1000 x 4字节将适合4k页面大小。

If you are talking data with varchars, then the problem is worse. How many characters are in each column? How many columns can be filled in? If you have 10 characters on average, and your page size is 8k, then you lose the data with a SQL error.

如果你正在与varchars谈论数据,那么问题就更糟了。每列中有多少个字符?可以填写多少列?如果平均有10个字符,并且页面大小为8k,那么您将丢失带有SQL错误的数据。

Laugh if you must, but this situation did occur with a particularly long winded typist in a flat datatable that I knew was pushing the limits.

如果你必须笑,但这种情况确实发生在一个特别长的蜿蜒打字员在一个平坦的数据表中,我知道正在推动极限。

#16


0  

.. to verify that the data is actually going in there.

..验证数据是否真正进入那里。

May be it is outdated, but you could use pixel map where single pixel is representing single cell of table (is screen is more then 1000) or 10 cells for one pixel with zoom region on click.

可能它已经过时了,但您可以使用像素图,其中单个像素表示表格的单个单元格(屏幕大于1000)或单个像素表示10个单元格,单击缩放区域。

The color of pixel will be data dependent. It could be black/white for empty/data. Or it could be color to show value grows or decrease with every row. Or red for sudden jumps of data. All anomalies you could catch normally with your eye in data grid.

像素的颜色将取决于数据。对于空/数据,它可以是黑/白。或者它可能是颜色显示值随着每一行增长或减少。或者红色表示突然跳转数据。您可以在数据网格中正常捕捉所有异常情况。

Then all you need is to catch click coordinates in the area of interest and use small table to show that part of table without any scrolling.

然后您需要的是捕获感兴趣区域中的点击坐标,并使用小表来显示表格的一部分而不进行任何滚动。

Just click to go back to pixel-map.

只需单击即可返回像素图。

#17


0  

Given that the user will have to scroll horizontally anyway, you could use a regular data grid showing a reasonable number of columns (say, 50). Then you have a horizontal scrollbar positioned under the grid that selects a subset of columns to show. When the scrollbar is at the left you show columns 1-50, when you click the right arrow you go to 2-51, etc.

鉴于用户无论如何都必须水平滚动,您可以使用显示合理数量的列(例如,50)的常规数据网格。然后,您在网格下方有一个水平滚动条,用于选择要显示的列的子集。当滚动条位于左侧时,您会显示1-50列,当您单击右箭头时,您会转到2-51,等等。

This gives you the scrolling capability without ever having to overload a grid control with data. While you would lose the ability to freely cursor around in the table or make large rectangular selections, it doesn't sound like that would be an issue for this application.

这为您提供了滚动功能,而无需使用数据重载网格控件。虽然您将失去在表格中*光标或进行大矩形选择的能力,但听起来不会是这个应用程序的问题。

#18


-1  

How much of the data is critical for the initial view? I can see doing something like a master/detail type grid where you're putting the critical columns (say like 10) onto the datagrid and when the user clicks to view the details, you can take the remaining columns and display them in a "properties area" or something in that regard.

有多少数据对初始视图至关重要?我可以看到做类似主/细节类型网格的事情,你将关键列(比如10)放到数据网格上,当用户点击查看详细信息时,你可以取剩下的列并将它们显示在“物业区“或在这方面的东西。

#19


-1  

If all you need is to make sure the data is being populated then why not have every column with a default value, say, 'void', 'blank', etc.

如果您只需确保填充数据,那么为什么不让每个列都具有默认值,例如'void','blank'等。

Then you can iterate through while counting non-default/total to show a percentage.

然后,您可以迭代计数非默认值/总计以显示百分比。

Now you can visualize the data completeness with a percentage value, maybe even record which columns had the default values (like to a list/array) for further investigation.

现在,您可以使用百分比值可视化数据完整性,甚至可以记录哪些列具有默认值(如列表/数组)以供进一步调查。

#20


-1  

You might consider checking with your user base and seeing what they really need to see, then set up views for each distinct need, in order to get the column count down.

您可以考虑与您的用户群一起检查并查看他们真正需要查看的内容,然后为每个不同的需求设置视图,以便减少列数。

Another option would be to read the data, and create a whopping big static set of html pages from it. Then you could invoke the browser from within your program to view it.

另一个选择是读取数据,并从中创建一个高大的静态html页面集。然后,您可以从程序中调用浏览器来查看它。

#21


-1  

Have a scrollable pane and show 10 columns at a time (these can be actively loaded or cached or whatever you need). When you are scrolled left, show the first ten. As you scroll right, show the latter sequence of columns. So all in all, only 10 columns are active at any given point. Trying to actually display 1000 columns would be nuts any other way in my opinion. PS: This is nothing more than an ideal guess; I'm not really sure if it's remotely possible.

有一个可滚动的窗格并一次显示10列(这些列可以主动加载或缓存,或者您需要的任何内容)。向左滚动时,显示前十个。向右滚动时,显示后面的列序列。总而言之,在任何给定点上只有10列有效。在我看来,尝试实际显示1000列将是任何其他方式。 PS:这只不过是一个理想的猜测;我不确定它是否可以远程实现。