I have a form with seven tapages. These span only one record with a
large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays
information about a particular Seller and is read from a
SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another
DealDataview.
What I want is the user to scroll through the records which will
affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the
tabpages displays data. Only on debug do the textboxes read that data
is written to them (Tabpage1), but this data never displays on the
actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of
each tabpage to the form's binding context, but as I am working iwth
two dataviews, I'm a little confused.
HELP?!!
Richard 7 3469
Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are
shown. Since all the tabpages are not visible when the form is loaded the
controls on those tabpages will not contain data until they are shown.
Ken
-----------------
"Richard" <xx******************@yahoo.co.uk> wrote in message
news:n3********************************@4ax.com...
I have a form with seven tapages. These span only one record with a
large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays
information about a particular Seller and is read from a
SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another
DealDataview.
What I want is the user to scroll through the records which will
affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the
tabpages displays data. Only on debug do the textboxes read that data
is written to them (Tabpage1), but this data never displays on the
actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of
each tabpage to the form's binding context, but as I am working iwth
two dataviews, I'm a little confused.
HELP?!!
Richard
Thanks for this Ken.
The form works well with the controls on the form itself. However on
the tabpages they will not show the data. Even adding the statement
for each tb as tabpage in tabcontrol.pages
tb.bindingcontext = me.bindingcontext
next tb
and, at the end of the load process
tabpage1.show()
tabpage2.show()
seems to have no effect.
Or do I need to show each tabpage before I am able to bind the
controls that exist on each tabpage?
Richard
On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com.. . I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard
Hi Ken,
I've spent another day on this but am really not getting very far.
My databinding is fine. If I move one of the text boxes to the main
form, the data displays as usual. But as soon as they are on the
tabpage, I am unable to get the tabpages to display any data
whatsoever from the dataset.
So the problem must be getting the tabpage to display the information,
or at least getting the tabpage to allow proper binding. No
exceptions are thrown up but there is no data.
I have tried setting the binding context of each page to the form. I
have tried making each page visiible before binding. And I have tried
showing each form before doing the actual binding.
All to no avail. What am I doing wrong?
Richard
On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com.. . I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard
Hi,
I would have to see some code to find your problem. Here is a
simple example. I have a datagrid and tabcontrol on the form. I added 3
tabpages to the tabcontrol. On tabpage1 I added textbox1, on tabpage2 I
added textbox2, and tabpage3 I added textbox3.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim strConn As String
Dim strSQL As String
Dim daEmployees As OleDbDataAdapter
Dim conn As OleDbConnection
Dim ds As New DataSet
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn &= "Data Source =C:\Northwind.mdb;"
conn = New OleDbConnection(strConn)
daEmployees = New OleDbDataAdapter("Select * From Products", conn)
daEmployees.Fill(ds, "Products")
DataGrid1.DataSource = ds.Tables("Products")
DataGrid1.DataSource = ds.Tables("Products")
ds.Tables("Products").DefaultView.AllowNew = False
TextBox1.DataBindings.Add("Text", ds.Tables("Products"),
"ProductName")
TextBox2.DataBindings.Add("Text", ds.Tables("Products"),
"UnitsInStock")
TextBox3.DataBindings.Add("Text", ds.Tables("Products"),
"UnitsOnOrder")
End Sub
Ken
------------------
"Richard" <xx******************@yahoo.co.uk> wrote in message
news:0o********************************@4ax.com...
Hi Ken,
I've spent another day on this but am really not getting very far.
My databinding is fine. If I move one of the text boxes to the main
form, the data displays as usual. But as soon as they are on the
tabpage, I am unable to get the tabpages to display any data
whatsoever from the dataset.
So the problem must be getting the tabpage to display the information,
or at least getting the tabpage to allow proper binding. No
exceptions are thrown up but there is no data.
I have tried setting the binding context of each page to the form. I
have tried making each page visiible before binding. And I have tried
showing each form before doing the actual binding.
All to no avail. What am I doing wrong?
Richard
On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com.. . I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard
Here is the code so far.
I have simplified it for readability.
Public Class frmDeals
Inherits System.Windows.Forms.Form
Protected Const SQL_CONNECTION_STRING As String = _
"Server=CONRAD;" & _
"Database=OTwoSourcing;" & _
"UID=sa;password=;"
Public strConnection As String = SQL_CONNECTION_STRING
Private cnnOTwo As SqlConnection
Private cmdAdvertising As SqlCommand, cmdCourseType As SqlCommand
-----------------------------------
Dim objConnection As SqlConnection = New SqlConnection(strConnection)
Dim objDataAdapter As SqlDataAdapter = New SqlDataAdapter( _
"SELECT * " & _
"FROM Deals " & _
"WHERE SellerID=" & SellerNo & _
" ORDER BY LeadReceivedDate", objConnection)
Dim objDataSet As DataSet
Dim objDataView As DataView
Dim objCurrencyManager As CurrencyManager
------------------------------------
objDataSet = New DataSet
objDataAdapter.Fill(objDataSet, "Deals")
objDataView = New DataView(objDataSet.Tables("Deals"))
objCurrencyManager = CType(Me.BindingContext(objDataView),
CurrencyManager)
' Set the binding context for each page to the form's binding
' context
For Each tp As TabPage In tabDeals.TabPages
tp.BindingContext = Me.BindingContext
Next
---------------------------------------
' Clear the databindings on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.Name
Case "tabProperty"
txtAddress.DataBindings.Clear()
Case "tabFinancial"
txtPrice.DataBindings.Clear()
End Select
Next tp
' Bind all textboxes on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.name
Case "tabProperty"
tp.Show() ' (also tried tp.visible=true)
txtAddress.DataBindings.Add("Text", objDataView,
"Address")
Case "tabFinancial"
tp.show() ' (also tried tp.visible=true)
txtPrice.Databindings.Add("Text",objDataView,"Pric e")
End Select
Next tp
The value for SellerNo is passed to this form from a calling form.
Richard
On Tue, 2 Aug 2005 03:20:24 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
I would have to see some code to find your problem. Here is a simple example. I have a datagrid and tabcontrol on the form. I added 3 tabpages to the tabcontrol. On tabpage1 I added textbox1, on tabpage2 I added textbox2, and tabpage3 I added textbox3.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strConn As String Dim strSQL As String Dim daEmployees As OleDbDataAdapter Dim conn As OleDbConnection Dim ds As New DataSet
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" strConn &= "Data Source =C:\Northwind.mdb;"
conn = New OleDbConnection(strConn)
daEmployees = New OleDbDataAdapter("Select * From Products", conn) daEmployees.Fill(ds, "Products")
DataGrid1.DataSource = ds.Tables("Products")
DataGrid1.DataSource = ds.Tables("Products") ds.Tables("Products").DefaultView.AllowNew = False
TextBox1.DataBindings.Add("Text", ds.Tables("Products"), "ProductName") TextBox2.DataBindings.Add("Text", ds.Tables("Products"), "UnitsInStock") TextBox3.DataBindings.Add("Text", ds.Tables("Products"), "UnitsOnOrder") End Sub
Ken ------------------ "Richard" <xx******************@yahoo.co.uk> wrote in message news:0o********************************@4ax.com.. . Hi Ken,
I've spent another day on this but am really not getting very far.
My databinding is fine. If I move one of the text boxes to the main form, the data displays as usual. But as soon as they are on the tabpage, I am unable to get the tabpages to display any data whatsoever from the dataset.
So the problem must be getting the tabpage to display the information, or at least getting the tabpage to allow proper binding. No exceptions are thrown up but there is no data.
I have tried setting the binding context of each page to the form. I have tried making each page visiible before binding. And I have tried showing each form before doing the actual binding.
All to no avail. What am I doing wrong?
Richard On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com. .. I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard
Hi,
You dont need to set the binding context for the tabpage = to the
binding context for the form. It will automatically be the same.
Ken
-----------------------
"Richard" <xx******************@yahoo.co.uk> wrote in message
news:4n********************************@4ax.com...
Here is the code so far.
I have simplified it for readability.
Public Class frmDeals
Inherits System.Windows.Forms.Form
Protected Const SQL_CONNECTION_STRING As String = _
"Server=CONRAD;" & _
"Database=OTwoSourcing;" & _
"UID=sa;password=;"
Public strConnection As String = SQL_CONNECTION_STRING
Private cnnOTwo As SqlConnection
Private cmdAdvertising As SqlCommand, cmdCourseType As SqlCommand
-----------------------------------
Dim objConnection As SqlConnection = New SqlConnection(strConnection)
Dim objDataAdapter As SqlDataAdapter = New SqlDataAdapter( _
"SELECT * " & _
"FROM Deals " & _
"WHERE SellerID=" & SellerNo & _
" ORDER BY LeadReceivedDate", objConnection)
Dim objDataSet As DataSet
Dim objDataView As DataView
Dim objCurrencyManager As CurrencyManager
------------------------------------
objDataSet = New DataSet
objDataAdapter.Fill(objDataSet, "Deals")
objDataView = New DataView(objDataSet.Tables("Deals"))
objCurrencyManager = CType(Me.BindingContext(objDataView),
CurrencyManager)
' Set the binding context for each page to the form's binding
' context
For Each tp As TabPage In tabDeals.TabPages
tp.BindingContext = Me.BindingContext
Next
---------------------------------------
' Clear the databindings on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.Name
Case "tabProperty"
txtAddress.DataBindings.Clear()
Case "tabFinancial"
txtPrice.DataBindings.Clear()
End Select
Next tp
' Bind all textboxes on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.name
Case "tabProperty"
tp.Show() ' (also tried tp.visible=true)
txtAddress.DataBindings.Add("Text", objDataView,
"Address")
Case "tabFinancial"
tp.show() ' (also tried tp.visible=true)
txtPrice.Databindings.Add("Text",objDataView,"Pric e")
End Select
Next tp
The value for SellerNo is passed to this form from a calling form.
Richard
On Tue, 2 Aug 2005 03:20:24 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
I would have to see some code to find your problem. Here is a simple example. I have a datagrid and tabcontrol on the form. I added 3 tabpages to the tabcontrol. On tabpage1 I added textbox1, on tabpage2 I added textbox2, and tabpage3 I added textbox3.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strConn As String Dim strSQL As String Dim daEmployees As OleDbDataAdapter Dim conn As OleDbConnection Dim ds As New DataSet
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" strConn &= "Data Source =C:\Northwind.mdb;"
conn = New OleDbConnection(strConn)
daEmployees = New OleDbDataAdapter("Select * From Products", conn) daEmployees.Fill(ds, "Products")
DataGrid1.DataSource = ds.Tables("Products")
DataGrid1.DataSource = ds.Tables("Products") ds.Tables("Products").DefaultView.AllowNew = False
TextBox1.DataBindings.Add("Text", ds.Tables("Products"), "ProductName") TextBox2.DataBindings.Add("Text", ds.Tables("Products"), "UnitsInStock") TextBox3.DataBindings.Add("Text", ds.Tables("Products"), "UnitsOnOrder") End Sub
Ken ------------------ "Richard" <xx******************@yahoo.co.uk> wrote in message news:0o********************************@4ax.com.. . Hi Ken,
I've spent another day on this but am really not getting very far.
My databinding is fine. If I move one of the text boxes to the main form, the data displays as usual. But as soon as they are on the tabpage, I am unable to get the tabpages to display any data whatsoever from the dataset.
So the problem must be getting the tabpage to display the information, or at least getting the tabpage to allow proper binding. No exceptions are thrown up but there is no data.
I have tried setting the binding context of each page to the form. I have tried making each page visiible before binding. And I have tried showing each form before doing the actual binding.
All to no avail. What am I doing wrong?
Richard On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com. .. I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard
Okay,
Thank you for this Ken. I'm amost there. I have stripped away all
the coding that was referring to a specific tab page.
What was causing the problem was to do with how I opened the form
specifying the records that the sqldataadapter should load.
On opening the main (opening) form of my project I am creating
instances of all the forms.
On my Deals form (the form with the tabpages) I've created a public
property SellerNo which is set from the Seller form to display all
Deals by a particular seller when I actually open the Deals Form (the
class of which is already loaded at startup remember).
It seems though that because I had already loaded the form at startup,
the sqldataadapter had already loaded the valid records (i.e. where
the SellerID was null, rather than when SellerID=7) and was therefore
ignoring my new request to load it again.
I was calling the Deals form from this button on the Sellers Form
Dim cfrmDeals As New frmDeals
cfrmDeals.SellerNo = Convert.ToInt32(txtSellerID.Text)
cfrmDeals.Visible = True
cfrmDeals.Activate()
I am using a multi-form application, and one which I was creating new
instances of each form on loading my main form
i.e.
cfrmSwitchboard = Me
cfrmSellers = New frmSellers
cfrmDeals = New frmDeals
Hope this is clear.
Is there another way to do what I was looking to do?
Richard
On Tue, 2 Aug 2005 20:36:33 -0400, "Ken Tucker [MVP]"
<vb***@bellsouth.net> wrote: Hi,
You dont need to set the binding context for the tabpage = to the binding context for the form. It will automatically be the same.
Ken ----------------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:4n********************************@4ax.com.. . Here is the code so far. I have simplified it for readability.
Public Class frmDeals Inherits System.Windows.Forms.Form Protected Const SQL_CONNECTION_STRING As String = _ "Server=CONRAD;" & _ "Database=OTwoSourcing;" & _ "UID=sa;password=;"
Public strConnection As String = SQL_CONNECTION_STRING Private cnnOTwo As SqlConnection Private cmdAdvertising As SqlCommand, cmdCourseType As SqlCommand ----------------------------------- Dim objConnection As SqlConnection = New SqlConnection(strConnection)
Dim objDataAdapter As SqlDataAdapter = New SqlDataAdapter( _ "SELECT * " & _ "FROM Deals " & _ "WHERE SellerID=" & SellerNo & _ " ORDER BY LeadReceivedDate", objConnection)
Dim objDataSet As DataSet Dim objDataView As DataView Dim objCurrencyManager As CurrencyManager ------------------------------------ objDataSet = New DataSet objDataAdapter.Fill(objDataSet, "Deals") objDataView = New DataView(objDataSet.Tables("Deals")) objCurrencyManager = CType(Me.BindingContext(objDataView), CurrencyManager)
' Set the binding context for each page to the form's binding ' context
For Each tp As TabPage In tabDeals.TabPages tp.BindingContext = Me.BindingContext Next --------------------------------------- ' Clear the databindings on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.Name Case "tabProperty" txtAddress.DataBindings.Clear() Case "tabFinancial" txtPrice.DataBindings.Clear() End Select Next tp
' Bind all textboxes on each page
For Each tp As TabPage In tabDeals.TabPages
Select Case tp.name
Case "tabProperty" tp.Show() ' (also tried tp.visible=true) txtAddress.DataBindings.Add("Text", objDataView, "Address")
Case "tabFinancial" tp.show() ' (also tried tp.visible=true) txtPrice.Databindings.Add("Text",objDataView,"Pric e") End Select Next tp
The value for SellerNo is passed to this form from a calling form.
Richard
On Tue, 2 Aug 2005 03:20:24 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
I would have to see some code to find your problem. Here is a simple example. I have a datagrid and tabcontrol on the form. I added 3 tabpages to the tabcontrol. On tabpage1 I added textbox1, on tabpage2 I added textbox2, and tabpage3 I added textbox3.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strConn As String Dim strSQL As String Dim daEmployees As OleDbDataAdapter Dim conn As OleDbConnection Dim ds As New DataSet
strConn = "Provider = Microsoft.Jet.OLEDB.4.0;" strConn &= "Data Source =C:\Northwind.mdb;"
conn = New OleDbConnection(strConn)
daEmployees = New OleDbDataAdapter("Select * From Products", conn) daEmployees.Fill(ds, "Products")
DataGrid1.DataSource = ds.Tables("Products")
DataGrid1.DataSource = ds.Tables("Products") ds.Tables("Products").DefaultView.AllowNew = False
TextBox1.DataBindings.Add("Text", ds.Tables("Products"), "ProductName") TextBox2.DataBindings.Add("Text", ds.Tables("Products"), "UnitsInStock") TextBox3.DataBindings.Add("Text", ds.Tables("Products"), "UnitsOnOrder") End Sub
Ken ------------------ "Richard" <xx******************@yahoo.co.uk> wrote in message news:0o********************************@4ax.com. .. Hi Ken,
I've spent another day on this but am really not getting very far.
My databinding is fine. If I move one of the text boxes to the main form, the data displays as usual. But as soon as they are on the tabpage, I am unable to get the tabpages to display any data whatsoever from the dataset.
So the problem must be getting the tabpage to display the information, or at least getting the tabpage to allow proper binding. No exceptions are thrown up but there is no data.
I have tried setting the binding context of each page to the form. I have tried making each page visiible before binding. And I have tried showing each form before doing the actual binding.
All to no avail. What am I doing wrong?
Richard On Mon, 1 Aug 2005 06:55:24 -0400, "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote:
Hi,
Here a link on how to bind a control to a datasource. http://msdn.microsoft.com/library/de...dingstopic.asp
VB.net does not update the info in bound controls until they are shown. Since all the tabpages are not visible when the form is loaded the controls on those tabpages will not contain data until they are shown.
Ken ----------------- "Richard" <xx******************@yahoo.co.uk> wrote in message news:n3********************************@4ax.com ... I have a form with seven tapages. These span only one record with a large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays information about a particular Seller and is read from a SellerDataview at form load.
On Tabpages 2-7, the information comes from another table/another DealDataview.
What I want is the user to scroll through the records which will affect only Tabpages 2-7.
My problem is that at load, none of the information from any of the tabpages displays data. Only on debug do the textboxes read that data is written to them (Tabpage1), but this data never displays on the actual form. For tabpages 2-7, nothing seems to be written at all.
I understand that I may need to manually set the binding context of each tabpage to the form's binding context, but as I am working iwth two dataviews, I'm a little confused.
HELP?!!
Richard This discussion thread is closed Replies have been disabled for this discussion. Similar topics
8 posts
views
Thread by Alexia |
last post: by
|
reply
views
Thread by Thanos |
last post: by
|
2 posts
views
Thread by JG |
last post: by
|
4 posts
views
Thread by Peter Row |
last post: by
|
1 post
views
Thread by Luc |
last post: by
|
3 posts
views
Thread by VJ |
last post: by
|
2 posts
views
Thread by Kevin |
last post: by
|
11 posts
views
Thread by Pete Kane |
last post: by
|
7 posts
views
Thread by davidpryce123 |
last post: by
| | | | | | | | | | |