This is a migrated thread and some comments may be shown as answers.

Concurrancy Grid access

1 Answer 7 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Moustafa
Top achievements
Rank 1
Moustafa asked on 03 Sep 2008, 07:34 AM
Hi telerik team

Please read the following scenario carefully then find a solution for this problem:
  • I have a grid with 5 rows.
  • If two users access the same grid at the same time from different machines.
  • the first user delete the 3rd record.
  • the second user click the edit button to edit the 3rd record.
  • the problem is that the grid put the 4th row in edit mode because the 3rd one  really deleted.
  • This is a great  problem that may make users confused as the edit form open the next row not the clicked row.
My comment .. when command issued the grid make databind so new rows added or removed from the grid , so grid must not rebind data when edit or delete command issued to solve this problem .

Is there any way (from telerik) to overcome the problem ??

Remark:

I'm using  telerik controls for asp.net ajax with framework 3.5


1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 04 Sep 2008, 12:14 PM
Hi Moustafa,

When RadGrid uses its auto-generated for editing/inserting an item, it always rebinds beforehand. This is to ensure most up-to-date data is fetched from the data source. Unfotunately, if you need exactly the opposite behavior for RadGrid, you will need to implement some mechanism of manual checking if the currently accessed data item still exists in the data source and then notify the user of the changed data.

On the other hand, if you only need to check if the item for which "Edit" command has been issued is the same as the actual item put in edit mode, you can simply record some datakey value from the item on the client, store it in a hidden input and then compare the value of the hidden input with the value of the item currently in edit mode.

Kind regards,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Moustafa
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or