以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 我这个绑定下拉怎么没数据 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=147194) |
-- 作者:a937775799 -- 发布时间:2020/3/11 18:23:00 -- 我这个绑定下拉怎么没数据 在窗口加载后 事件中,下拉没数据啊,但是另外的窗口 又有数据,弹出的内容也没问题呀 Dim cb As WinForm.ComboBox = e.Form.Controls("cb_flowCode") cb.DataSource = "flow" cb.DisplayMember = "flowMain" cb.ValueMember = "flowMainCode" cb.DataFilter = "[flowCode] = \'" & tabS.Replace(tabn,"") & "\' and [flowMainCode] <>\'\'" MessageBox.Show( "[flowCode] = \'" & tabS.Replace(tabn,"") & "\' and [flowMainCode] <>\'\'" ) cb.DataSort = "flowPx" |
-- 作者:有点蓝 -- 发布时间:2020/3/12 8:54:00 -- 没有符合条件的数据 cb.DataFilter = "[flowCode] = \'" & tabS.Replace(tabn,"") & "\' and [flowMainCode] is not null"
|
-- 作者:a937775799 -- 发布时间:2020/3/12 10:13:00 -- 我昨天测试了好久不是没有数据 我 不要这行也没有cb.DataFilter = "[flowCode] = \'" & tabS.Replace(tabn,"") & "\' and [flowMainCode] is not null" 原因竟然是这样就好了DataSource 要放到后面 cb.DisplayMember = "flowMain" cb.ValueMember = "flowMainCode" cb.DataSource = "flow"
|
-- 作者:有点蓝 -- 发布时间:2020/3/12 10:23:00 -- 那就上传实例测试 |