【问题标题】:Double axis Data Grid双轴数据网格
【发布时间】:2017-08-17 03:47:11
【问题描述】:

所以,基本上我正在创建一个页面,该页面将查看合同的所有详细信息,其中一部分将是财务审查,我希望上轴是年份,左轴是详细信息,例如

<table>
  <tr>
    <td>
      
    </td>
    <td>
      <strong>2014</strong>
    </td>
    <td>
      <strong>2015</strong>
    </td>
    <td>
      <strong>2016</strong>
    </td>
  </tr>
  <tr>
    <td>
      <strong>Income</strong>
    </td>
    <td>
      2014 Data
    </td>
    <td>
      2015 Data
    </td>
    <td>
      2016 Data
    </td>
  </tr>
  <tr>
    <td>
      <strong>Expense</strong>
    </td>
    <td>
      2014 Data
    </td>
    <td>
      2015 Data
    </td>
    <td>
      2016 Data
    </td>
  </tr>
  <tr>
    <td>
      <strong>Surplus</strong>
    </td>
    <td>
      2014 Data
    </td>
    <td>
      2015 Data
    </td>
    <td>
      2016 Data
    </td>
  </tr>
</table>

用 boundfields 显示它的最佳方式是什么?

因此,我可以将其视为几乎可以说的网格视图

table.DataSource = GetData();
table.DataBind();

编辑: 澄清一下,我不想要一个表格,我正在寻找一个 .Net 元素,如果可能的话,它将以与该表格相同的方式显示数据?

【问题讨论】:

    标签: c# html css asp.net .net


    【解决方案1】:

    您也可以使用数据重复器,它为您提供相同的网格外观,但它确实创建了一个表(我相信是这样......)。来看看

    Introduction to the DataRepeater Control (Visual Studio)

    Displaying Data with the DataList and Repeater Controls (VB)

    Easily display data with the Repeater control in .NET

    【讨论】:

      【解决方案2】:

      查看 bootstrap.css。它们有一些硬编码的 css 值,就像表格一样工作。他们有一个很酷的网格样式系统以及数百个其他预定义的 css 值和 JS 值。 这是他们的网格系统构建的直接链接:http://getbootstrap.com/css/#grid

      祝你好运。

      【讨论】:

      • 谢谢!我去看看:)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-29
      • 2016-03-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-27
      • 1970-01-01
      相关资源
      最近更新 更多