By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

Data grid inserting value using code

P: n/a
Jim
I have a datagrid on a windows form that is filled using a data adapter and
dataset created in code. I have mapped columns to the various fields. The
user enters new infromation into the grid and then clicks a save button on
the toolbar to save the updated or new data. Two questions:

1. How do I let the user move directly from the row of newly inserted data
to the button and get the data to save. HasChanges does not recoginize the
row has changes unless we click in another row first.

2. I want to insert a specific value into one of the columns to be saved
with the changed column(s). I also need to know which row has the changes.

How do I accomplish this in vb.NET?

Thanks,
--
Jim
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

1. How do I let the user move directly from the row of newly inserted data
to the button and get the data to save. HasChanges does not recoginize the
row has changes unless we click in another row first.
Probably one of the most asked questions in the dotNet newsgroups.
\\\as sample
BindingContext(ds.Tables(0)).EndCurrentEdit()
///
Before the test on haschanges by instance
2. I want to insert a specific value into one of the columns to be saved
with the changed column(s). I also need to know which row has the changes.

How do I accomplish this in vb.NET?


Every datarow has a rowstate, however you have to find those row while
looping throught the dataset.

http://msdn.microsoft.com/library/de...statetopic.asp

I hope this helps?

Cor
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.