I am new to VB2008 and i am having a hard time putting the code to run a form i have created. It would be binding to the parceltool.dbf or th parceltool.mdb. I would like for the user to enter the the parcel number and then click ok and populate listview1, ListView2, ListView3, Listview4 and so on from the table. Any help would be great! Thanks and awesome forum!
unfortunatly the listview is not a control that supports databinding. You would probably be better off using a DataGridView which does fully support databinding. If you really want to use a listview, you will have to populate it manually from your database.
Yes, but it basically involves you looping through your data from the database (using one of the various data access methods that .NET offers) and creating a row from each record as a listviewitem and adding that to the listview. Basically you just have to manually populate it since there is no databinding to do it for you.
Is there way to make the DataGridView vertical? I don't understand what you mean by "manually populate"? so it would be pointless to do it with out DataGridView?
Ahh. I think I see what your problem is, and I should have originally from the picture.
It looks like you are trying to use a listview when you really want to be using a textbox (or possibly a combobox). So I think you are just using the wrong control.
Did you create a datasource that links to your database yet? If you click on the data sources tab next to the solution explorer one, it should tell you if you have one in your project yet or not.
Honestly the easiest thing to do would be to delete all the textboxes you made, and let the Visual Studio IDE do the work for you.
Just as a test before you go messing with the form you already created, add a new blank form to your project just so you can see how this works.
When you have your new blank form up in the designer, go to the datasource tab in visual studio, and you should see your datasource there that you created from the database. You may need to expand the dataset node to see the actual set of datatable inside, and once you do that click on that datatable and you should see a drop down arrow appear to the right of it. Click that drop down arrow, and select "details" (it is likely set to DataGridView by default). Once you do that, all you need to do is drag that datatable to your blank form, and when you let go, you will see VS work its magic, and create all the controls and labels you need, with the databinding already setup. From there you can tweak the UI form to your specifications (like the text in the labels and the sizes of the textboxes, etc..)
If you don't go this route, you need to go into the databinding properties of each textbox on your form, and manually databind their text property to the backing data source.
Can you give me some examples of how i would create the "SEARCH" textbox, the "OK". One would enter a parcel number in the "Enter Parcel Number" textbox and then click ok to execute the seach then click print.
I would like for a person to in put a parcel number in the "ENTER PARCEL NUMBER:" Textbox, then click the Ok, button and auto populate the fields on the form.
I am not sure how to start this, any help would be great. Thanks.