So i'm fairly new to this .NET business i'm a asp developer at the mo. I can create pages that pull data from a database and display it no probs.
However i'm struggling with getting the data into a dataset then a datagrid and then allowing the user to update the dataset only. I don't want the change to go straight to the database.
I think were i'm falling over is where you acutally :
a) setup the dataset (as in dim ds as new dataset etc etc)
b) where you create the data adapter and pass the sql
c) where you create the table within the dataset (fill)
d) where you databind the whole thing.
I've got five datagrids on a page and a dataset with 5 table. each table can be edited. if the datagrid is 1 line then everything works fine. but if the datagrid is multi line i change one line then when i click to change the other one the first line goes back to its original value. its driving me nuts!! i think i've tried a, b, c, d in every possible position on the code behind page with varying degrees of failure!
can any1 help?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)
However i'm struggling with getting the data into a dataset then a datagrid and then allowing the user to update the dataset only. I don't want the change to go straight to the database.
I think were i'm falling over is where you acutally :
a) setup the dataset (as in dim ds as new dataset etc etc)
b) where you create the data adapter and pass the sql
c) where you create the table within the dataset (fill)
d) where you databind the whole thing.
I've got five datagrids on a page and a dataset with 5 table. each table can be edited. if the datagrid is 1 line then everything works fine. but if the datagrid is multi line i change one line then when i click to change the other one the first line goes back to its original value. its driving me nuts!! i think i've tried a, b, c, d in every possible position on the code behind page with varying degrees of failure!
can any1 help?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)