Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:blackzhu 请进···

1楼
mr725 发表于:2010/9/18 20:28:00

前天你说: 奇怪了,为什么刷新列没有用?一列一列刷新可以.  下面就可以整列刷新啦:

你也是老狐先生了,应该看得出为什么刷新列没有用的原因了

 

If e.DataCol.Name = "产品" Then
    If e.DataRow.IsNull("产品") Then 
        e.DataRow("出货明细") = Nothing 
    Else
        Dim mx As String
        Dim drs As List(Of DataRow)
        drs = DataTables("出货明细").Select("[公司] = '" & e.DataRow("公司") & "'")
        For Each dr As DataRow In drs
            mx = mx & dr("出货时间") & " " &  dr("出货数量") & vbCrLf
        Next
        e.DataRow("出货明细") = ""
        e.DataRow("出货明细") = mx
    End If
End If

2楼
mr725 发表于:2010/9/18 20:56:00

 

如果你想在产品列发生变化后,时时刷新整列可以这样(也就是说不需要重置列了):

 

If e.DataCol.Name = "产品" Then   
    If e.DataRow.IsNull("产品") Then
        e.DataRow("出货明细") = Nothing
    Else
        Dim mx As String
        Dim drs As List(Of DataRow)  
        For Each dr0 As DataRow In DataTables("表A").datarows           
            drs = DataTables("出货明细").Select("[公司] = '" & dr0("公司") & "'")
            For Each dr As DataRow In drs
                mx = mx & dr("出货时间") & " " &  dr("出货数量") & vbCrLf
            Next
            dr0("出货明细") = ""
            dr0("出货明细") = mx
            mx = ""
        Next       
    End If
End If

3楼
狐狸爸爸 发表于:2010/9/19 8:08:00

呵呵,向Mr725兄的热心、认真、负责学习。

[此贴子已经被作者于2010-9-19 8:08:43编辑过]
4楼
blackzhu 发表于:2010/9/20 7:54:00
我说MR-725老兄是大师吗,我比较笨,代码学来学去,不会灵活贯通.
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03906 s, 2 queries.