-
From Textbox to Datagrid
I am programming in VB.Net and I would like to know if it is possible to update a datagrid with data that is contained within a text box. Let me explain. I have a Datagrid that displays information within an Access Database table. I have 2 particular columns that I would like to populate with information that the end user will supply (Customer Name and Phone). I am able to manually type in the information within the actual Datagrid and update the information to my database, although I would like to be able to have the end user enter there name and phone in the two textboxes that I created and then have a button that the end user clicks and I want the datagrid to be updated then I can click on the update button for the datagrid and then it updates the database. I am still sorta new at this - so I know that I am probably running around the house 3 times just to go inside the front door - but still learning, I guess me all have to go through this learning process. I would like to know if this is even possible with this language and any programming code examples and hints that will put me on the right road again. Help Please.........
-
Although I don't know the reason behind your idea of having separate textboxes, but as far as I can tell it is quite possible. The update button of your textboxes may update the dataset that the datagrid is bound to and the update button of your datagrid updates the database.
-
Thank you for your response. Several things, first, I am confused about the actual dataset, my understanding of a dataset is that it is a snapshot "copy" of my database - I did not think that the dataset was being updated at all - I was thinking that the datagrid properties allowed me to update the database, opposed to me updating the dataset (which I thought was not able to be updated, because it is just a snapshot) and the dataset updating the database (again, I thought the dataset could not update the database). Second - an explanation - I am using the textboxes for - I am working with an API of a map program. I pass it an address and a zipcode and it returns the LAT and LON of that criteria and displays it within my textbox - I do not want to use the datagrid at all, but I have been able to figure out how to update my database using the dg. I am still fairly new at this and am struggling at understanding "CONCEPTS" so to speak - but I am diligent and will sooner or later get this program figured out - just looking for a little help from my forum friends - someone at another forum recommended your forum...... If you would like me to paste my code let me know and I will be happy to comply. Thanks for your time. :o)