以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何显示多列表格 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=121982) |
-- 作者:刘林 -- 发布时间:2018/7/16 21:17:00 -- 如何显示多列表格 Case "cjcxr.htm" wb.AddPageTitle("","pageheader","我的成绩") \' wb.InsertHTML("<div style=\'text-align:center\'><img src=\'./images/backr.png\' width=50 height=50 /></div>") With wb.AddTable("","Table2") .Alternate = 3 .Attribute="style=\'text-align:center\'" Dim nms() As String = {"考试名称","地理","物理","化学","总分","班序","校序","区序"} .Head.AddRow(nms) .ColWidth = "60px,25px,25px,25px,25px,25px,25px,25px" For Each r As DataRow In DataTables("成绩").sql Select("身份证件号 = \'" & e.Cookies("username") & "\'") With .Body.AddRow(r("考试名称"),r("地理_"),r("物理_物总"),r("化学_化总"),r("总分"),r("班序"),r("校序"),r("区序")) End With Next End With \' wb.InsertHTML("<div style=\'text-align:center\'><img src=\'./images/exit.jpg\' width=50 height=50 /></div>") With wb.AddButtonGroup("","btg1", False) Dim btn = .Add("btn1","左翻") btn.Attribute = "" btn.kind = 1 .Add("btn2", "退出","","default.htm").kind=1 .Add("btn3", "右翻","","cjcxr.htm").Kind = 1 End With Case "cjcx.htm" wb.AddPageTitle("","pageheader","我的成绩") \'wb.InsertHTML("<div style=\'text-align:center\'><img src=\'./images/backl.png\' width=50 height=50 /></div>") With wb.AddTable("","Table1") .Alternate = 3 .Attribute="style=\'text-align:center\'" Dim nms() As String = {"考试名称","语文","数学","英语","政治","历史","生物"} .Head.AddRow(nms) .ColWidth = "60px,25px,25px,25px,25px,25px,25px" For Each r As DataRow In DataTables("成绩").sqlS elect("身份证件号 = \'" & e.Cookies("username") & "\'") With .Body.AddRow(r("考试名称"),r("语文_语总"),r("数学_数总"),r("英语_英总"),r("政治_政总"),r("历史_历总"),r("生物_")) End With Next End With \' wb.InsertHTML("<div style=\'text-align:center\'><img src=\'./images/exit.jpg\' width=50 height=50 /></div>") With wb.AddButtonGroup("","btg1", False) .Add("btn1", "左翻","","cjcx.htm").Kind = 1 Dim b1 = .Add("btn2", "退出","") b1.kind=1 b1.Attribute = "" \' .Add("btn2","退出").Attribute = "" .Add("btn3", "右翻","","cjcxr.htm").Kind = 1 End With 老师,因为查询显示的列比较多,我想了个办法分成了两个页面,但这样很不好看,效率也不高,请问如何实现能显示多列
|
-- 作者:有点蓝 -- 发布时间:2018/7/16 21:22:00 -- 手机界面本来就不适合显示太多的东西。 应该这样:表格只显示关键的列,点击行后显示这行的明细内容,如下面这样
|
-- 作者:刘林 -- 发布时间:2018/7/16 21:30:00 -- 一次考试有多科,如果单独显示某科,效果不好,这该如何是好? |
-- 作者:刘林 -- 发布时间:2018/7/16 21:32:00 -- 现在的问题就是关键列就是有点多 |
-- 作者:有点蓝 -- 发布时间:2018/7/16 21:38:00 -- 就像2楼说的那样,表格显示关键的列,明细通过表单模式显示 |
-- 作者:刘林 -- 发布时间:2018/7/16 21:42:00 -- 也就是一个页面显示一次考试的各科,纵向排列每科成绩,这样也想过,但因为一个学生有多次考试,为方便每次成绩比较,因此各行要显示出来 [此贴子已经被作者于2018/7/16 21:42:05编辑过]
|
-- 作者:有点蓝 -- 发布时间:2018/7/16 21:51:00 -- 另外做比较的页面,提供下拉选择,单独比较某科,比如语文最近10次的成绩,一样和2楼图片方式显示 |
-- 作者:刘林 -- 发布时间:2018/7/16 21:54:00 -- 这样始终要分开来弄,我是想一次性将学生的每科每次都显示在一个表里 [此贴子已经被作者于2018/7/16 21:55:42编辑过]
|
-- 作者:有点蓝 -- 发布时间:2018/7/16 22:14:00 -- 使用原生的table表格,自己填充 https://www.cnblogs.com/kccdzz/p/9106467.html
|
-- 作者:刘林 -- 发布时间:2018/7/17 18:04:00 -- Dim e As RequestEventArgs = args(0) Dim sb As New StringBuilder sb.appendLine("<!doctype html>") sb.appendLine("<head>") sb.appendLine("</head>") \'sb.AppendLine("<meta name=\'viewport\' widht=\'100%\',user-scalable=0\'>") Dim lst As List(of DataRow) = DataTables("成绩").sqlSelect("身份证件号 = \'" & e.Cookies("username") & "\'") Dim nms() As String = {"考试名称","语文_语总","数学_数总","英语_英总","政治_政总","历史_历总","生物_","地理_","物理_物总","化学_化总","总分","总分班序","总分校序","总分区序"} Dim cps() As String = {"考试名称","语文","数学","英语","政治","历史","生物","地理","物理","化学","总分","班序","校序","区序"} sb.appendline("<p style=\'font-size:60px\'align=\'center\'>我的成绩</p>") sb.appendline("<div style=\'width:2200px; height:2000px; overflow:scroll;\'>") sb.AppendLine("<Table border=\'1\'width=\'100%\' align=\'center\'>") \'sb.AppendLine("<caption style=\'font-size:80px\' align =\'center\'>我的成绩<caption></br>") sb.Append("<tr>") For Each cp As String In cps sb.Append("<td style=\'font-size:60px\'>" & cp & "</td>") Next sb.AppendLine("</tr>") For r As Integer=0 To lst.Count-1 sb.Append("<tr>") For Each nm As String In nms sb.Append("<td style=\'font-size:50px\' align =\'center\'>" & lst(r)(nm) & "</td>") Next sb.AppendLine("</tr>") Next sb.AppendLine("</Table></br></br>") sb.AppendLine("</dv>") e.WriteString(sb.ToString) 老师我这样个想法,把sb.appendline("<p style=\'font-size:60px\'align=\'center\'>我的成绩</p>")用于显示标题,固定显示在中央,表格可以左右划动,问题一是"我的成绩"并没显示在中央,划动表格时标题也跟着划动了,怎么改能实现想法,谢谢
[此贴子已经被作者于2018/7/17 18:05:49编辑过]
|