D
dmalhotr2001
Hi,
I have a datagrid hypothetically with this data:
id | text | link
-------------------------------
1 | first row | delete button
2 | second row | delete button
I have 2 users with 2 DIFFERENT browser instances.
I have a problem.
If user 1 deletes row with id 1, his screen refreshes and he gets:
id | text | link
-------------------------------
2 | second row | delete button
However now, user 2, still has the previous screen:
id | text | link
-------------------------------
1 | first row | delete button
2 | second row | delete button
User 2 tries to delete row 1 within a few seconds of user 1 deleting
row 1.
However when user 2 does this user 2 deletes row 2 and gets!
id | text | link
-------------------------------
To select the row to delete I do this:
string selectedRow = e.Item.Cells[0].Text;
However for user 2 it picks up the second row which is incorrect. How,
do I tell in .net to pick up the current row, so for each user they
pick up the current row. It looks like its posting back. Is there a
way to capture which button was clicked because onpostback I'm binding
the grid repeatedly. I want it not to bind the grid if delete is
pressed.
Thanks

I have a datagrid hypothetically with this data:
id | text | link
-------------------------------
1 | first row | delete button
2 | second row | delete button
I have 2 users with 2 DIFFERENT browser instances.
I have a problem.
If user 1 deletes row with id 1, his screen refreshes and he gets:
id | text | link
-------------------------------
2 | second row | delete button
However now, user 2, still has the previous screen:
id | text | link
-------------------------------
1 | first row | delete button
2 | second row | delete button
User 2 tries to delete row 1 within a few seconds of user 1 deleting
row 1.
However when user 2 does this user 2 deletes row 2 and gets!
id | text | link
-------------------------------
To select the row to delete I do this:
string selectedRow = e.Item.Cells[0].Text;
However for user 2 it picks up the second row which is incorrect. How,
do I tell in .net to pick up the current row, so for each user they
pick up the current row. It looks like its posting back. Is there a
way to capture which button was clicked because onpostback I'm binding
the grid repeatedly. I want it not to bind the grid if delete is
pressed.
Thanks