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

Form Template Edit adds multiple records

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 06 Nov 2008, 04:14 PM
Hi..
I'm using a form template in a grid to edit and add records.  When you click the Insert or 'Check' button multiple times or very quickly the Item_Command is called mutiple times before the template /  edit form closes - thus duplicate records are inserted.  How do I prevent multiple clicks on the edit form before closing or prevent multiple clicks on a button.
thanks again

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Nov 2008, 10:41 AM
Hello,

One possible option in this case would be to assign an onclick client side handler to the PerformInsert button (which triggers the insert operation) and disable it once clicked. Another alternative would be to use a loading panel with 0 transparency, which would effectively hide the ajaxified control, thus disallowing the behavior which you mentioned initially.

Kind regards,
Yavor
the Telerik team

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