I have a fairly simple Windows Form (UserControl). What I have is two tabs (a tab control) that both reference the same UserControl. I have several Textboxes and Checkboxes that need to get populated from a DataTable. The DataTable is working fine (getting data from an SP). I have also build the SP's for adding, updating and deleting rows.
Here is my roadblock. I cannot seem to be able to bind the textboxes and checkboxes to the data in the DataTable. What's more, there could be several records returned in the datatable and I need to know when there are more than one (person has more than one instance of a license. Here is what I got:
Then in a separate sub, I check for DataTable changes:
This never sees a change and the Textboxes are not getting populated.
I will also need to know how to do the same thing with Checkboxes.
Thanks!
LJ
Here is my roadblock. I cannot seem to be able to bind the textboxes and checkboxes to the data in the DataTable. What's more, there could be several records returned in the datatable and I need to know when there are more than one (person has more than one instance of a license. Here is what I got:
Code:
Me.txtName.DataBindings.Add("Text", dtUserDetails, "FullName")
Me.txtUserId.DataBindings.Add("Text", dtUserDetails, "UserId")
Me.txtLicType.DataBindings.Add("Text", dtUserDetails, "LicenseType")
Me.txtIssueDate.DataBindings.Add("Date", dtUserDetails, "LicenseIssueDate")
Me.txtExpDate.DataBindings.Add("Date", dtUserDetails, "LicenseExpirationDate")
Then in a separate sub, I check for DataTable changes:
Code:
Dim DEALicenseChanges As New DataTable
DEALicenseChanges = getStaffListChanges()
This never sees a change and the Textboxes are not getting populated.
I will also need to know how to do the same thing with Checkboxes.
Thanks!
LJ