Rss & SiteMap

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

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

标题:[求助]如何给多行文本框赋值

1楼
hanxuntx 发表于:2011/10/2 11:29:00
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "SELECT DISTINCT Role From {Roles}"

Dim dt As DataTable
dt = cmd.ExecuteReader()

Dim cmb As WinForm.TextBox 
cmb = e.Form.Controls("ztxet")

Dim ss As List (Of String)=dt.GetUniqueValues("","Role")

新增用户角色窗口,做到这一步了,如何给多行文本框赋值?
2楼
hanxuntx 发表于:2011/10/2 13:08:00
窗口的AfterLaod事件添加代码

Dim cmd As New SQLCommand
cmd.C
cmd.CommandText = "SELECT DISTINCT Group From {Groups}"

Dim dt As DataTable
dt = cmd.ExecuteReader()

Dim cmb As WinForm.TextBox 
cmb = e.Form.Controls("ztxet")

Dim ss As String=dt.GetComboListString("Group","")
    cmb.Value=ss.replace("|",vbcrlf)
[此贴子已经被作者于2011-10-2 13:08:09编辑过]
3楼
mr725 发表于:2011/10/2 14:20:00

是这样吗:

..........

Dim ss As String=dt.GetComboListString("Group","")
Dim s,tx As String
For i As Integer = 1 To ss.split("|").length -1
    tx = tx & ss.split("|")(i) & vbcrlf
Next
cmb.Value = tx

4楼
hanxuntx 发表于:2011/10/3 9:09:00
我上面的红色那句貌似可以了
共4 条记录, 每页显示 10 条, 页签: [1]

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

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