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

set a value in a datagrid

Status
Not open for further replies.

goransaler

IS-IT--Management
Mar 6, 2003
56
SE
how do i pass a value from a text box on the form to a
field in a datagrid

 
It depends on how you have created the datagrid. A DataGrid is bound to a data source such as a DataSet. You make changes to the underlying data source and these are then reflected in the data grid.

Assuming that dataSet1 is a DataSet bound to a data grid, changing the underlying data is simple:


dataSet1.Tables[0].Rows[0][1]="NewEntry";

There is a lot of documentation on this on msdn -- for example, see
---
dino
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top