[VB.NET]winform ComboBox数据绑定问题
来源:互联网 发布:淘宝店铺转让 编辑:程序博客网 时间:2024/04/28 12:43
<script type="text/javascript"><!--google_ad_client = "pub-8333940862668978";/* 728x90, 创建于 08-11-30 */google_ad_slot = "4485230109";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
winform ComboBox数据绑定问题
sql中用的char类型 这样就造成
ComboBox数据绑定时候 有好多个空格
但是如果在 select中使用了 RTRIM 就会使 绑定失败
显示 这个表的id 而不是RTRIM (name) 的name了
__________________________________________________________________________
您的SQL句能看一下么?
__________________________________________________________________________
正常的
"select content,id from itemcontent where sort=@sort order by [order] "
失败的
"select RTRIM (content),id from itemcontent where sort=@sort order by [order] "
id为自动增长类型
__________________________________________________________________________
trim()可以摸去末尾的空格.
__________________________________________________________________________
不行的话,读出来之后再处理好了。
__________________________________________________________________________
select rtrim(content) as content, id from itemcontent where sort=@sort order by [order]
__________________________________________________________________________
quickball() 谢谢 找出了我的毛病 确实需要as
继续这个问题
如果是 * 如何 rtrim ??? rtrim(*)??
我去试验一下
__________________________________________________________________________
rtrim(*) 是不行的
如果有好多列
如何 解决?
__________________________________________________________________________
一个一个 写 太麻烦了
__________________________________________________________________________
可以先取出来了再去掉末尾的空格.
ComboBox.Items.Add(ds.Table(0).Rows(i)(n).ToString().Trim())
__________________________________________________________________________
用绑定的方法
不使用add
__________________________________________________________________________
再顶一下
__________________________________________________________________________
winform ComboBox数据绑定问题
sql中用的char类型 这样就造成
ComboBox数据绑定时候 有好多个空格
但是如果在 select中使用了 RTRIM 就会使 绑定失败
显示 这个表的id 而不是RTRIM (name) 的name了
__________________________________________________________________________
您的SQL句能看一下么?
__________________________________________________________________________
正常的
"select content,id from itemcontent where sort=@sort order by [order] "
失败的
"select RTRIM (content),id from itemcontent where sort=@sort order by [order] "
id为自动增长类型
__________________________________________________________________________
trim()可以摸去末尾的空格.
__________________________________________________________________________
不行的话,读出来之后再处理好了。
__________________________________________________________________________
select rtrim(content) as content, id from itemcontent where sort=@sort order by [order]
__________________________________________________________________________
quickball() 谢谢 找出了我的毛病 确实需要as
继续这个问题
如果是 * 如何 rtrim ??? rtrim(*)??
我去试验一下
__________________________________________________________________________
rtrim(*) 是不行的
如果有好多列
如何 解决?
__________________________________________________________________________
一个一个 写 太麻烦了
__________________________________________________________________________
可以先取出来了再去掉末尾的空格.
ComboBox.Items.Add(ds.Table(0).Rows(i)(n).ToString().Trim())
__________________________________________________________________________
用绑定的方法
不使用add
__________________________________________________________________________
再顶一下
__________________________________________________________________________
- [VB.NET]winform ComboBox数据绑定问题
- [VB.NET]combobox数据绑定
- vb.net ComboBox 绑定数据字段
- VB.NET数据源与ListBox,ComboBox,TextBox的数据绑定
- C# WinForm 中ComboBox数据绑定的问题
- ComboBox 数据绑定问题
- VB.Net,WinForm中层次数据绑定TreeView的实现
- [VB.NET]数据传递,绑定问题?
- winform技巧—combobox控件数据绑定
- C# Winform Combobox手动绑定数据
- WinForm 中 comboBox控件之数据绑定
- vb.net中combobox与数组绑定
- winform下ComboBox的绑定问题
- Combobox数据绑定的问题
- .Net平台Winform两个ComboBox控件绑定同一个数据源的问题
- winform combobox控件绑定
- CheckBox 在Winform 中ADO.Net的数据绑定问题
- [初学VB.NET]数据绑定
- [VB.NET]求救.速度.!帮忙写点东西.!
- [VB.NET]VB.NET生成的EXE文件在我的电脑上能运行,但是放到其他的电脑上就不行了?
- level set 介绍3
- [VB.NET]初始化PictureBox数组怎么操作
- [VB.NET]如何将TEXT中的文字导入到Word?知道的进下
- [VB.NET]winform ComboBox数据绑定问题
- level set 介绍4(水平集方法)
- 差分信号详解
- [VB.NET].NET精简框架下用VB.NET怎么实现在picturebox上显示不同图片???
- [VB.NET]vb.net里面怎么生成一个CSV文件,并把检索出来的数据集导入CSV
- level set 介绍4(水平集应用)
- Jquery插件站点
- MySQL引擎简介
- C# 获取计算机的硬件信息的方法