I have BatchUpdate activated on a WebDataGrid.
How can I intercept the postback on the client side and ask for user's confirmation to Submit or Cancel the changes.?
The postback can be caused by Submit Button, Paging, Column with adjustment etc.
hi nikolay i have same problem can you give me sample
Hi akhavany,
If you have any other questions, please feel free to contact us.
Thanks for replying.
Hi, Akhavany.
I think this sample will help you. You can see that what you need to do to intercept postback, when you are changing the grid pages, is to create a handler for the client-side event 'PagingClientEvents-PageIndexChainging'.
<ig:Paging PagingClientEvents-PageIndexChanging="wdg1PageIndexChanging"></ig:Paging>
Now in the handler you will be able to create script that will request user confirmation and then you will be able either to intercept or make the postback.In the sample the postback is achieved using hidden submit button.
The idea is that you need to know all the behaviors that are causing postbacks to the server and you will need to find the client-side event that happens just before the postback and attach the same handler to them that will insist on user confirmation. Such client-side events have suffix '-ing' and you need to declare them in their corresponding behavior.
If you have external controls that are causing postbacks, for example ASP.NET Button, you will need to create client-side click handler, and also disable automatic postback behavior.
I hope this will help you and if you have some questions don't hesitate to ask them.
Best regards,
Nikolay