G
Guest
I have a dataset that is filled from a SQL backend using stored procedures.
I display the data with a data bound DataGridView and a binding source
object. I can update and delete any row I want but every time I add a new
row using the new row in the DataGridView it adds it but when I switch rows
it disappears. I do a search of the data and the row is defiantly not added
to the dataset. I use DefaultValuesNeeded event to add a default value to
every column but my row still just disappears once you switch rows. What am
I missing? Do I have to add the row to the dataset myself; I thought the
DataGridView and the binding source took care of this? Can someone point me
to an example to look at? I have not found anything in my searching to help
me figure out my problem.
Also once I call the update method of my data adapter and it inserts the new
row in the database how do I get my stored procedure to return the row ID for
the row that was just added and add the row ID to the correct row in my
dataset?
Any help would be appreciated.
Thanks…
Drew
I display the data with a data bound DataGridView and a binding source
object. I can update and delete any row I want but every time I add a new
row using the new row in the DataGridView it adds it but when I switch rows
it disappears. I do a search of the data and the row is defiantly not added
to the dataset. I use DefaultValuesNeeded event to add a default value to
every column but my row still just disappears once you switch rows. What am
I missing? Do I have to add the row to the dataset myself; I thought the
DataGridView and the binding source took care of this? Can someone point me
to an example to look at? I have not found anything in my searching to help
me figure out my problem.
Also once I call the update method of my data adapter and it inserts the new
row in the database how do I get my stored procedure to return the row ID for
the row that was just added and add the row ID to the correct row in my
dataset?
Any help would be appreciated.
Thanks…
Drew