From: Mr. X. on 29 May 2010 07:05 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 29 May 2010 07:14 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 29 May 2010 08:27 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 29 May 2010 12:10 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 :) >>
|
Pages: 1 Prev: priority queue Next: need help looping through string of names |