Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a DataSet to fill a DatGridView

Status
Not open for further replies.

FJBoy

Programmer
Feb 27, 2007
4
0
0
GB
I'm using VB2005 and i want to create a dataset where i select data from various tables of my database and then enter it into a datagridview, but i want to set the names of the columns. Also i want to be able to add other entries into the datagridview including what is already there. For example i have a datagridview displaying details of 1 person, then i want to add another person to the datagridview so it displays them both.

How can i do this? Has an one got any examples of code they can show me please
 
Hello,

The best method is to create a typed dataset.

You can then fill this dataset with what tables you have included into the designer.

Once you have done that you can set the datasource on the datagridview and display the table you want to display.

To add another person you just create an input form and add a new row into the table.

If this is not enough to get your job done, contact me again and I will give you some code examples.

Steve
 
Hi thanks for your help, if you could give me an example. What i'm thinking of doing is generating the table for the datagridview at the page load up now then when ever i want to add details of a member to the datagridview i just click the button and take the relevent members number thats entered in a text box
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top