从dataview填充文本框时出现问题 [英] problem populating a text box from dataview
问题描述
大家好,我在从数据视图获取数据时遇到问题
hello all, i'm having problem getting data from a dataview
我正在使用此代码_dtsdatos是我的数据集,_dtvdatos是我的数据视图,问题是texbox中未填充正确的值,因此可以获取表的第一个.
i'm using this code _dtsdatos is my dataset and _dtvdatos my dataview, the problem is the texbox is not filled with the correct values, alwasy get the first of the table.
Try
_dtvdatos.RowFilter = "id_Cliente=" & Integer.Parse(DtgFol.Rows(DtgFol.CurrentRow.Index).Cells(1).Value)
LblCLi.DataBindings.Add("Text", _dtsdatos.Tables(0), "name_Cli")
Catch ex As ArgumentException
End Try
还有其他方法可以从行过滤器之后的数据视图或数据集中获取数据吗?
are there other ways to get the data from the dataview or the dataset afther the rowfilter?
在此先感谢您的帮助.
推荐答案
我们没有使用数据绑定的示例.
We don't have a sample which using databinding for this.
但是,我们有完整的示例可以解决您的问题.
However, we have a complete sample to get your problem solved.
http://www.vb-tips.com/CurrencyManager.aspx
明智的做法是,不要表现得像一个不知道自己在做什么的人,如果没有真正处理错误,请从您的代码中删除该鸵鸟代码(尝试,抓住最终尝试).
And be wise and don't show so much up as somebody who does not know what he is doing and remove that ostrich code (try, catch end try) from your code if it does not really is handling the errors.
这篇关于从dataview填充文本框时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!