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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a column to a datagrid 1

Status
Not open for further replies.

cruise95

Programmer
Oct 7, 2003
56
US
I would like to add some rows to an existing datagrid. If I add rows to a new datatable and then bind this datatable to the datagrid, then the grid will refresh/reload (Since it is being recreated).

Is there anyway to add rows/values to a datagrid? Thank you for any help.
 
why do you want to make it a new datatable? Why not the one that is already there?

Christiaan Baes
Belgium

"Time for a new sig." - Me
 
when the user opens up the application, an initial datagrid is displayed (from a datadtable populated with values from mySQLTable). This table gets updated with new rows periodically. Every 15 seconds my application should grab any new records and add them to the existing datagrid.

I am not sure how to add a row to an existing datagrid.
 
you could just requery the database every 15 seconds and just rebuild your datatable each time instead of just getting the new rows. It will probebly be quicker that way.

just create a sub that creates the datatable for the datagrid and just recall it as needed.
 
Yes, rather than creating a new table, simply use a timer to call the database, get a new table of records, and update the DataGrid.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top