您的位置:程序门 -> vb -> 数据库(包含打印,安装,报表)



关于msfgrid移除行,再添加行的问题?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


关于msfgrid移除行,再添加行的问题?[已结贴,结贴人:qq5181688]
发表于:2008-01-11 22:33:31 楼主
表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢!
以下是显示表格数据代码:
with   msfgrid
                if   rs.recordcount   >   0   then
                        if   .rows   =   2   then
                                for   i   =   1   to   4
                                        cs   =   cs   &   .textmatrix(1,   i)
                                next   i
                                if   len(cs)   =   0   then
                                        .rows   =   rs.recordcount   +   1
                                        for   j   =   1   to   rs.recordcount
                                                for   i   =   1   to   9
                                                        select   case   i
                                                                case   1,   2,   3,   4,   5,   6
                                                                        .textmatrix(j,   i)   =   rs.fields(i   -   1)   &   ""
                                                                case   8
                                                                        .textmatrix(j,   i)   =   format(rs.fields(i   -   2)   &   "",   "0.00")
                                                                end   select
                                                next   i
                                                rs.movenext
                                        next   j
                                cs   =   ""
                                end   if
                        else
                                        .rows   =   .rows   +   rs.recordcount
                                                for   j   =   (.rows   -   rs.recordcount)   to   (.rows   -   1)
                                                        for   i   =   1   to   9
                                                                select   case   i
                                                                        case   1,   2,   3,   4,   5,   6
                                                                                .textmatrix(j,   i)   =   rs.fields(i   -   1)   &   ""
                                                                        case   8
                                                                                .textmatrix(j,   i)   =   format(rs.fields(i   -   2)   &   "",   "0.00")
                                                                        end   select
                                                        next   i
                                                        rs.movenext
                                                next   j
                        end   if
                end   if
                .col   =   7
                .row   =   1
                if   .textmatrix(1,   1)   <>   ""   then
                      msfgrid_click
                else
                      .col   =   0
                    .row   =   0
                end   if
        end   with
        rs.close
end   sub
以下是删除行代码:
        if   msfgrid.rows   =   2   then:   msfgrid.clear:   call   showfix:   else:   msfgrid.removeitem  
表现为,当有移除行时(删除几行,添加行时就会少几行),如果没有移除行操作,就不会有这种现象!望老鸟帮小鸟解决此问题!谢谢!
发表于:2008-01-12 10:45:001楼 得分:0
升级sp6就解决了,真晕!是bug吗?


快速检索

最新资讯
热门点击