|
-
Oct 21st, 2011, 02:19 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Clear Tables/Ctrls to open new File
I am using TextFieldParser to read a .txt file and create a DataTable
I then filter the table and create 4 new tables
I then bind those tables to BindingSources
Then Bind ComboBoxs to the BindingSource
Then bind TextBoxes to BindingSource
I like the user to be able to Open a new file without having to close the program
So upon opening a new file I have a sub routine that clears the tables the rows and the columns of each table as well the DataBindings to each control
The problem is once I do the Text Binding as such
Me.list1_MLStxt.DataBindings.Add("Text", Subject_Values.BindingSource1, Form10.mls_txt.Text)
Then when I open a new file I get an error message
conversion from string"""" to type double is not valid.
If I never perform the binding I can open and reopen different files without a problem. So this is causing me to think that the problem is with the way I am clear something? But I am obviously not sure
Is there something I am missing to clear everything properly in order to open and read and bind a new file?
Thanks for any suggestions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|