【问题标题】:Need suggestions for displaying somewhat complex table with ASP.NET Web Forms需要有关使用 ASP.NET Web 窗体显示复杂表格的建议
【发布时间】:2013-04-29 18:21:28
【问题描述】:

我对 ASP.NET Web 窗体没有太多经验,需要生成一些复杂的表格。

我有以下课程:

public class ServiceTable
{
    ...
    public IList<Service> Services { get; set; }
    public IList<ServiceJob> ServiceJobs { get; set; }
    ...
}

public class Service
{
    ...
    public string ServiceName { get; set; }
    public IList<ServiceJob> ServiceJobs { get; set; }
    ...
}

public class ServiceJob
{
    ...
    public string JobName { get; set; }
    ...
}

我需要为ServiceTable 中的每个Service 显示一列,标题应为ServiceName。然后我需要为ServiceTable 拥有的每个ServiceJob 设置一行,每行的第一列应该是JobName,接下来的应该是复选框,如果相应的服务具有ServiceJob,则检查这些复选框。
小样机:

+---------+--------------+--------------+---------------+  
|         | ServiceName1 | ServiceName2 | ServiceName..n|  
+---------+--------------+--------------+---------------+  
| JobName | ckbx         | ckbx         | ckbx          |  
+---------+--------------+--------------+---------------+  

我正在考虑 gridview,但似乎不知道如何实现。

我需要使用这个表格来显示已经输入的数据并输入新的数据。

期待前辈的建议!

【问题讨论】:

    标签: c# asp.net .net gridview webforms


    【解决方案1】:

    您必须使用嵌套的网格视图来实现...这里是walkthough

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-07
      • 2012-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多