From: Mr. X. on
Hello.
What is wrong of the following (the text has no data)? :

Dim FBndDataTable As DataTable
Dim FBndDataSource As BindingSource
....
FBndDataSource = New BindingSource
FBndDataSource.DataSource = DataTable
....
Dim drv As DataRowView
Dim dr As DataRow

drv = FBndDataSource.AddNew()
dr = drv.Row

....
' txtValue is TextBox.
txtValue.DataBindings.Add("Text", bs, "query_id")

Thanks :)
From: Mr. X. on
Sorry.
I shall try again :

What is wrong of the following (the textBox has no data)? :

Dim FBndDataTable As DataTable
Dim FBndDataSource As BindingSource
....
FBndDataSource = New BindingSource
FBndDataSource.DataSource = DataTable
....
Dim drv As DataRowView
Dim dr As DataRow

drv = FBndDataSource.AddNew()
dr = drv.Row

dr("query_id") = 1

FBndDataTable.Rows.Add(dr)

FBndDataSource.Position = n ' holds the current position
....
' txtValue is TextBox.
txtValue.DataBindings.Add("Text", bs, "query_id") 'even I put a value, I
cannot see it.

Thanks :)

From: Cor Ligthert[MVP] on
txtValue.DataBindings.Add("Text", FBndDataSource, "query_id") 'even I put a
value, I

You bind two properties together

"Mr. X." <nospam(a)nospam_please.com> wrote in message
news:uMHOgAy$KHA.1700(a)TK2MSFTNGP02.phx.gbl...
> Sorry.
> I shall try again :
>
> What is wrong of the following (the textBox has no data)? :
>
> Dim FBndDataTable As DataTable
> Dim FBndDataSource As BindingSource
> ...
> FBndDataSource = New BindingSource
> FBndDataSource.DataSource = DataTable
> ...
> Dim drv As DataRowView
> Dim dr As DataRow
>
> drv = FBndDataSource.AddNew()
> dr = drv.Row
>
> dr("query_id") = 1
>
> FBndDataTable.Rows.Add(dr)
>
> FBndDataSource.Position = n ' holds the current position
> ...
> ' txtValue is TextBox.
> txtValue.DataBindings.Add("Text", bs, "query_id") 'even I put a value, I
> cannot see it.
>
> Thanks :)
>
From: Mr. X. on
Sorry,
I don't understand what should I do.

Thanks :)

"Cor Ligthert[MVP]" <Notmyfirstname(a)planet.nl> wrote in message
news:eetUepy$KHA.5808(a)TK2MSFTNGP02.phx.gbl...
> txtValue.DataBindings.Add("Text", FBndDataSource, "query_id") 'even I put
> a value, I
>
> You bind two properties together
>
> "Mr. X." <nospam(a)nospam_please.com> wrote in message
> news:uMHOgAy$KHA.1700(a)TK2MSFTNGP02.phx.gbl...
>> Sorry.
>> I shall try again :
>>
>> What is wrong of the following (the textBox has no data)? :
>>
>> Dim FBndDataTable As DataTable
>> Dim FBndDataSource As BindingSource
>> ...
>> FBndDataSource = New BindingSource
>> FBndDataSource.DataSource = DataTable
>> ...
>> Dim drv As DataRowView
>> Dim dr As DataRow
>>
>> drv = FBndDataSource.AddNew()
>> dr = drv.Row
>>
>> dr("query_id") = 1
>>
>> FBndDataTable.Rows.Add(dr)
>>
>> FBndDataSource.Position = n ' holds the current position
>> ...
>> ' txtValue is TextBox.
>> txtValue.DataBindings.Add("Text", bs, "query_id") 'even I put a value, I
>> cannot see it.
>>
>> Thanks :)
>>