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!

Datagrid new record - columns display (null)

Status
Not open for further replies.

rwttm001

IS-IT--Management
Nov 20, 2002
26
GB
I have a datagrid bound to a datatable but on entering a new row all the columns display (null). I have a dataadapter with select and insert commands to display and insert relevant data. Is there a way to avoid this?

On a more general note is it considered best practice to insert data in this manner or to have a number of controls outside of the datagrid with an update button to update the grid and commit to the database?

TIA
 
I guess the way around this is to look at the columns collection of the datatable. Each column can have a default value. I would guess that if you populate the default value, then that is what will be displayed on the new row.



Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top