以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  110求助 怎么让重复填充只对指定的列才有效  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=94832)

--  作者:闻林
--  发布时间:2017/1/3 15:45:00
--  110求助 怎么让重复填充只对指定的列才有效
怎么让重复填充只对指定的列才有效,求大师指点,小弟送三棵约
--  作者:有点色
--  发布时间:2017/1/3 16:27:00
--  

 你可以自己做一个按钮实现功能。

 

 Dim dcs() As String = {"第一列", "第二列"}
dim t as table = CurrentTable
for j as integer = t.LeftCol to t.RightCol
    if array.IndexOf(dcs, t.cols(j).name) >= 0 then
        dim str as string = t.rows(t.TopRow)(j)
        for i as integer = t.TopRow to t.BottomRow
            t.rows(i)(j) = str
        next
    else
        msgbox("列【" & t.cols(j).name & "】不能重复填充")
    End If
Next


--  作者:闻林
--  发布时间:2017/1/6 9:29:00
--  
Dim t As Table  = CurrentTable
If t.cols(t.ColSel).Name = "短转_总件数" Or  t.cols(t.ColSel).Name = "短转_总体积m3" Or t.cols(t.ColSel).Name = "短转_总重量T" Or  t.cols(t.ColSel).Name = "短转_运费" Or t.cols(t.ColSel).Name = "短转_装车费" Or  t.cols(t.ColSel).Name = "短转_卸车费" Or  t.cols(t.ColSel).Name = "托运_总体积m3" Or t.cols(t.ColSel).Name = "托运_总重量T" Or  t.cols(t.ColSel).Name = "托运_运费" Or t.cols(t.ColSel).Name = "托运_接货费" Or  t.cols(t.ColSel).Name = "托运_送货费" Or  t.cols(t.ColSel).Name = "托运_其它费" Or  t.cols(t.ColSel).Name = "托运_预付金额元"  Then
Else


For i As Integer = CurrentTable.LeftCol To CurrentTable.RightCol
    For j As Integer = CurrentTable.TopRow + 1 To CurrentTable.BottomRow
        CurrentTable.Rows(j)(i) = CurrentTable.Rows(CurrentTable.TopRow)(i)
    Next
Next


End If

--  作者:有点色
--  发布时间:2017/1/6 9:31:00
--  
 请,参考2楼写代码。