以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何把临时的DataTable 赋值给控件的DataSource  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=154245)

--  作者:ehbx_ysj
--  发布时间:2020/9/9 11:13:00
--  如何把临时的DataTable 赋值给控件的DataSource
Public dtCustType  As DataTable \'客户类型表

如何把临时的DataTable  赋值给控件的DataSource

--  作者:有点蓝
--  发布时间:2020/9/9 11:19:00
--  
控件.DataSource = dtCustType
--  作者:ehbx_ysj
--  发布时间:2020/9/9 14:51:00
--  
Dim clbCustType As WinForm.CheckedListBox = e.Form.Controls("clb_客户类型")
If dtCustType IsNot Nothing Then   
    clbCustType.DisplayMember = "CName" \'设置显示列
    clbCustType.ValueMember = "ID" \'设置取值列
    clbCustType.DataSource= dtCustType \'列表项目来自于客户表
End If
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2020/9/9 14:57:00
--  
这种用法只能绑定主表,不支持临时表。临时表只能改为使用ComboList