以文本方式查看主题
- Foxtable(狐表) (http://foxtable.com/bbs/index.asp)
-- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2)
---- [求助] (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=70732)
|
-- 作者:江南小城
-- 发布时间:2015/6/27 19:47:00
-- [求助]
老师好,筛选目录树显示数据后无法筛选。
此主题相关图片如下:筛选.png
|
-- 作者:sloyy
-- 发布时间:2015/6/28 0:35:00
--
没发现问题呀?
|
-- 作者:江南小城
-- 发布时间:2015/6/28 8:36:00
--
老师好,点击目录树在表中不能筛选。
|
-- 作者:sloyy
-- 发布时间:2015/6/28 9:30:00
--
可以呀
|
-- 作者:大红袍
-- 发布时间:2015/6/28 9:36:00
--
无语,你根据就没写代码。
AfterSelectNode事件
Dim s As String = e.Form.Controls("CheckedComboBox筛选树").Text Dim Colstr() As String Dim qts As String() = {"\'","#",""} Dim trv As WinForm.TreeView = e.Sender Dim flt As String = "" Dim nd As WinForm.TreeNode Dim pd As WinForm.TreeNode Dim notchecked As Integer = 0 Colstr = s.split("|") nd = e.Node If nd.Name = "显示所有行" Then flt = "" Else Dim rts() As String = nd.FullPath.Split("\\") Dim val As String = "" For i As Integer = 0 To rts.length - 1 If e.Form.Controls("Tbl_Main").Table.DataTable.DataCols(Colstr(i)).IsString Then If rts(i) <> "空" Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0) End If ElseIf rts(i) = "空" Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf e.Form.Controls("Tbl_Main").Table.DataTable.DataCols(Colstr(i)).IsDate Then If rts(i) <> #0001-1-1 0:00:00# Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1) Else val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1) End If ElseIf rts(i) = #0001-1-1 0:00:00# Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf e.Form.Controls("Tbl_Main").Table.DataTable.DataCols(Colstr(i)).IsNumeric Then If rts(i) <> 0 Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2) Else val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2) End If ElseIf rts(i) = 0 Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf e.Form.Controls("Tbl_Main").Table.DataTable.DataCols(Colstr(i)).IsBoolean Then If rts(i) <> False Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & True & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & True & qts(0) End If ElseIf rts(i) = False Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & False & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & False & qts(0) End If End If End If Next If flt > "" Then flt = flt & " Or (" & val & ")" Else flt = val End If End If
e.Form.Controls("Tbl_Main").Table.Filter = flt
|
-- 作者:江南小城
-- 发布时间:2015/6/28 15:48:00
--
谢谢老师好了,另外有个问题窗口录入数据重新打开项目保存不了。
[此贴子已经被作者于2015/6/28 15:48:19编辑过]
|
-- 作者:大红袍
-- 发布时间:2015/6/28 15:50:00
--
你要说什么窗口,什么表,什么列不保存啊
|
-- 作者:大红袍
-- 发布时间:2015/6/28 16:01:00
--
这个原因
http://www.foxtable.com/help/topics/1813.htm
|
-- 作者:江南小城
-- 发布时间:2015/6/28 17:44:00
--
老师上面问题解决了可是下面有来问题了,通过股票代码关联股票明细表添加行,同时复制股票名称内容下面代码不起作用。
If e.DataCol.Name = "股票代码" Then If e.NewValue Is Nothing Then e.DataRow("股票名称") = Nothing e.DataRow("板块") = Nothing e.DataRow("证交所") = Nothing e.DataRow("股票等级") = Nothing Else Dim dr As DataRow dr = DataTables("股票").Find("[股票代码] = \'" & e.NewValue & "\'") If dr IsNot Nothing e.DataRow("股票名称") = dr("股票名称") e.DataRow("板块") = dr("板块") e.DataRow("证交所") = dr("证交所") e.DataRow("股票等级") = dr("股票等级") End If End If End If
|
-- 作者:大红袍
-- 发布时间:2015/6/28 17:57:00
--
呃....哪个窗口,什么操作后,代码不执行?
|