以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 有劳袍大师 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=86822) |
||||
-- 作者:hbhb -- 发布时间:2016/6/27 9:57:00 -- 有劳袍大师 大师:见实例 请问:如何实现每页显示10行记录?
|
||||
-- 作者:大红袍 -- 发布时间:2016/6/27 10:04:00 -- 用分页加载啊
http://www.foxtable.com/help/topics/2269.htm
|
||||
-- 作者:hbhb -- 发布时间:2016/6/27 10:20:00 -- 只是举个例子,不要用帮助中的分页加载功能,自己逻辑编写代码怎么写? |
||||
-- 作者:大红袍 -- 发布时间:2016/6/27 10:26:00 -- Dim p As Integer = 2 Dim c As Integer = 10 Dim t As Table = Tables("表A") Dim idxs As String = "-1," Dim drs As List(Of DataRow) = t.DataTable.Select("", "_sortkey") For i As Integer = (p-1)*c To p*c-1 If i < drs.count Then idxs &= drs(i)("_Identify") & "," End If Next t.filter = "_Identify in (" & idxs & ")" |
||||
-- 作者:hbhb -- 发布时间:2016/6/27 10:28:00 -- 比如说,我要条件读取所有邮件的标题,然后一页10个,在表中显示? |
||||
-- 作者:大红袍 -- 发布时间:2016/6/27 10:30:00 -- 参考4楼啊。 |
||||
-- 作者:hbhb -- 发布时间:2016/6/27 10:39:00 -- 能否写全各个按钮的代码,我来拜读比对一下? |
||||
-- 作者:大红袍 -- 发布时间:2016/6/27 10:48:00 -- 无语,看懂4楼代码啊 |
||||
-- 作者:hbhb -- 发布时间:2016/6/27 11:09:00 -- 请问:倒过来,从高向前以下代码错在哪里? static p As Integer = Tables("表A").rows.count\\10 + 1 Dim c As Integer = 10 Dim t As Table = Tables("表A") Dim idxs As String = "-1," Dim drs As List(Of DataRow) = t.DataTable.Select("", "_sortkey") For i As Integer = p*c-1To (p-1)*c step -1 If i < drs.count Then idxs &= drs(i)("_Identify") & "," End If Next p = p -1 t.filter = "_Identify in (" & idxs & ")" |
||||
-- 作者:大红袍 -- 发布时间:2016/6/27 11:11:00 -- Dim drs As List(Of DataRow) = t.DataTable.Select("", "_sortkey")
直接改成
Dim drs As List(Of DataRow) = t.DataTable.Select("", "_sortkey desc") |