|
-
Oct 29th, 2013, 11:34 AM
#1
Thread Starter
Junior Member
[RESOLVED] Read and display using DataGridView?
Hello,
I need to read multiple lines of input, one at a time, and then display the data so that the worker can make sure they entered each batch. The worker will scan in a batch number and that will go to the SQL table to get more information. After that, I have to display this information for them to see. They can't change it at this point but if they missed one, then they can scan it again. How can I read a variable in and then display it to the datagridview. Also, it could be 2 lines or 20 or 50. Is datagridview even the right tool to use?
I apologize if this matches another thread. I searched and couldn't seem to find anything in this line
Thanks to everyone for any assistance.
Last edited by cpeterson36; Oct 29th, 2013 at 11:39 AM.
Reason: Update
-
Oct 29th, 2013, 11:54 AM
#2
Re: Read and display using DataGridView?
This is a good place to start to learn how to work with data http://msdn.microsoft.com/en-US/vstu...#formsoverdata
-
Oct 29th, 2013, 03:23 PM
#3
Thread Starter
Junior Member
Re: Read and display using DataGridView?
Thanks for the link. It is a good one. I am a DBA but weak in VB.net so I know the data structures but need to know how to specifically do what I asked above. I know I could load the table and then retrieve it and put data into the datagrid view but am concerned about speed. I would like to just be able to grow the datagrid as they scan and then load each item into the table too. Any advice on that?
-
Oct 29th, 2013, 09:20 PM
#4
Re: Read and display using DataGridView?
Create a DataTable with the appropriate schema, populate it with any initial data from the database, bind it to a BindingSource and bind that to the DataGridView. You can add records via the BindingSource and then save the changes from the DataTable back to the database using a data adapter or table adapter or whatever. The details depend on whether you're using raw ADO.NET, a typed DataSet or some other data access technology.
-
Oct 30th, 2013, 01:25 PM
#5
Thread Starter
Junior Member
Re: Read and display using DataGridView?
Thanks for the help! I am off and running again. Closing this thread!
Tags for this Thread
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
|