以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- AddGrid 分组 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=172109) |
-- 作者:yifan3429 -- 发布时间:2021/9/24 1:24:00 -- AddGrid 分组 Select Case e.Path Case ds("网页") Dim wb As N ew WeUI wb.AddPage Title("","pageheader","城市之窗产品高清",ds("网页名称")) With wb.Ad dGrid("","g1") For Each dr As DataRow In Data Tables("企业资料库").datarows If dr("是否启用") = True And dr("资料来源") = "城市之窗" Then .Add("1",dr("资料名称"), "",dr("在线根目录")) End If Next \' End With e.WriteString(wb.Build) [此贴子已经被作者于2021/9/24 1:25:11编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/9/24 8:39:00 -- Select Case e.Path Case "test.htm" Dim wb As New WeUI wb.AddPageTitle("","pageheader","WeUI","微信网页设计样式库") wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>分组1</h3>") With wb.AddGrid("","g1") .Add("c1","Button", "./images/button.png").Attribute = "" .Add("c2","Cell", "./images/cell.png", "http://www.foxtable.com") .Add("c3","Toast", "./images/toast.png", "http://www.foxtable.com") .Add("c4","Dialog", "./images/dialog.png", "http://www.foxtable.com") .Add("c5","Progress", "./images/progress.png", "http://www.foxtable.com") .Add("c6","Msg", "./images/msg.png", "http://www.foxtable.com") End With wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>分组2</h3>") With wb.AddGrid("","g2") .Add("c7","Article", "./images/article.png", "http://www.foxtable.com") .Add("c8","ActionSheet", "./images/actionSheet.png", "http://www.foxtable.com") .Add("c9","Icons", "./images/icons.png", "http://www.foxtable.com") .Add("c10","Panel", "./images/panel.png", "http://www.foxtable.com") .Add("c11","Tab", "./images/tab.png", "http://www.foxtable.com") .Add("c12","SearchBar", "./images/search.png", "http://www.foxtable.com") End With e.WriteString(wb.Build) End Select
|
-- 作者:yifan3429 -- 发布时间:2021/9/24 9:01:00 -- Case ds("网页") Dim wb As New WeUI wb.AddPageTitle("","pageheader","城市之家",ds("网页名称")) With wb.AddGrid("","g1") For Each dr As DataRow In DataTables("网站数据").datarows wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>分组2</h3>") 希望 分组能加到循环内 自动根据数据表的 分类列 分组 If dr("是否启用") = True And dr("大类") = "城市之家" Then .Add(dr("函数名称"),dr("网站中文名"), dr("图标"), dr("网页链接")) End If Next End With e.WriteString(wb.Build)
|
-- 作者:有点蓝 -- 发布时间:2021/9/24 9:09:00 -- for each s as string in DataTables("网站数据").getvalues("分类","是否启用=true and 大类=\'城市之家\'") wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>" & s & "</h3>") With wb.AddGrid("","g" & s) For Each dr As DataRow In DataTables("网站数据").select("分类=\'" & s & "\' and 是否启用=true and 大类=\'城市之家\'") .Add(dr("函数名称"),dr("网站中文名"), dr("图标"), dr("网页链接")) Next End With next
|
-- 作者:yifan3429 -- 发布时间:2021/10/14 19:34:00 -- http://yifan9108.oicp.net/ 还是不能显示分组功能 求助老师 Dim e As RequestEventArgs = args(0) Dim ds As Row = Tables("网页表").Current Tables("网页表").current("访问次数") = Tables("网页表").current("访问次数")+1 Tables("网站数据").current("访问次数") = Tables("网站数据").current("访问次数")+1 Select Case e.Path Case ds("网页") Dim wb As New WeUI wb.AddPageTitle("","pageheader","湖南城市之窗",ds("网页名称")) For Each s As String In DataTables("网站数据").getvalues("分类","是否启用=true and 大类=\'城市之窗\'") wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>" & s & "</h3>") With wb.AddGrid("","g" & s) For Each dr As DataRow In DataTables("网站数据").Select("分类=\'" & s & "\' and 是否启用=true and 大类=\'城市之窗\'") .Add(dr("函数名称"),dr("网站中文名"), dr("图标"), dr("网页链接")) Next End With Next \' End With e.WriteString(wb.Build) wb.Save("D:\\ctw\\WWW\\index.html") End Select |
-- 作者:有点蓝 -- 发布时间:2021/10/14 20:50:00 -- 生成的网页是怎么样的 |
-- 作者:yifan3429 -- 发布时间:2021/10/15 18:47:00 -- 希望根据前面分类列分层组 如下图格式
[此贴子已经被作者于2021/10/15 18:47:24编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/10/16 9:02:00 -- 下面代码我测试没有问题,如果还是搞不懂请上传实例说明 Select Case e.Path Case "test.htm" Dim wb As New WeUI wb.AddPageTitle("","pageheader","湖南城市之窗",("网页名称")) For Each s As String In {"组1","组2"} wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>" & s & "</h3>") With wb.AddGrid("","g" & s) For i As Integer = 1 To 4 .Add(("函数名称" & i),("网站中文名" & i), ("图标" & i), ("网页链接" & i)) Next End With Next e.WriteString(wb.Build) End Select |
-- 作者:yifan3429 -- 发布时间:2021/10/17 17:23:00 -- Dim wb As New WeUI wb.AddPageTitle("","pageheader","湖南城市之窗",ds("网页名称")) For Each s As String In {"组1","组2"} 需要根据分类列自动分组 If dr("是否启用") = True And dr("大类") = "城市之窗家具案例" Then wb.InsertHTML("<h3 align=\'left\' style=\'margin-top:5px\'>" & s & "</h3>") With wb.AddGrid("","g" & s) For Each dr As DataRow In dt.datarows .Add(dr("函数名称"),dr("网站中文名"), dr("图标"), dr("网页链接")) 内容根据分类添加 Next End With End If Next 大类 二类 网站中文名 筛选大类 分组二类 详情是 网站中文名 |
-- 作者:有点蓝 -- 发布时间:2021/10/17 20:51:00 -- 不要那么死板,我连接不到您的数据库,所以测试是直接写死的 【For Each s As String In {"组1","组2"} 】效果和下面代码完全一样
For Each s As String In DataTables("网站数据").getvalues("分类","是否启用=true and 大类=\'城市之窗\'") |