Hi,
I've got a number of datagrids on a page that allow the user to edit the info. Some of them I know will only ever have one row, so when it comes to getting the data out and putting the edited data into variables its not a problem.
However, some of the datagrids I have no idea how many rows there will be and heres the problem. if a dg has 2 rows and 2 columns (one being the edit button so can be ignored) the scenario plays out as:
a) user clicks either edit button in either row, the row becomes editable they make the change click submit and the updated text appears in the correct row. Behind the scenes i have no idea how to put the edited value into a variable when they could quite concevably edit the data in both rows and i will need both sets of updated data AND will need to know the variable names for use later.
b) once the user has updated one row and then clicks on the other row to make a change, the first row they edited reverts back to it's old value! i'm pretty sure i've got my databinds in the right place, it only happens once on page load and then after every edit, cancel or update is pressed.
can any1 (understand!) help?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)
I've got a number of datagrids on a page that allow the user to edit the info. Some of them I know will only ever have one row, so when it comes to getting the data out and putting the edited data into variables its not a problem.
However, some of the datagrids I have no idea how many rows there will be and heres the problem. if a dg has 2 rows and 2 columns (one being the edit button so can be ignored) the scenario plays out as:
a) user clicks either edit button in either row, the row becomes editable they make the change click submit and the updated text appears in the correct row. Behind the scenes i have no idea how to put the edited value into a variable when they could quite concevably edit the data in both rows and i will need both sets of updated data AND will need to know the variable names for use later.
b) once the user has updated one row and then clicks on the other row to make a change, the first row they edited reverts back to it's old value! i'm pretty sure i've got my databinds in the right place, it only happens once on page load and then after every edit, cancel or update is pressed.
can any1 (understand!) help?
"Life is like a Ferrari, it goes to fast.
But that's ok, because you can't afford it anyway" - Jim Davis (Garfield)