I have telerik:RadGridView
1) User can not delete record
2) I want a message when they delete record confirmation message
3) User can not insert new record
I am using keyboard Insert and delete key for that
7 Answers, 1 is accepted
Now only want to know about confirmation message before delete
Setting CanUserDeleteRows to false will disable item removal altogether. If you would like to be able to delete rows only after the pending delete operation has been confirmed you should use our Deleting event. This event will fire just before any items are deleted. You can show the confirmation window when the Deleting event is fired and cancel it, which will cancel the pending delete operation, by setting e.Cancel = true.
Hope this helps.
the Telerik team
How can I perform the same but with an Async call in RadGridView_Deleting event ?
1 - I need to check in database if some condition is valid before allowing the user to save.
2 - Or, I need to open a ChildWindow and Wait for it to be closed before feeding the "e.Cancel" with a value.
Currently I'm using some kind of trick but I really don't like it.
The trick is that :
e.Cancel is allways True in RadGridView_Deleting. After that the async operation is called (opening of the ChildWindow, RIA call, etc...) and in it's Closed/Loaded/Done. event I perform the delete (or not) myself based on Async Return.
Yet, as I've said, I really hate this way...
There is Any COOL "Telerik's Way" to perform this kind of tasks ?
What is going wrong? Any idea someone?
This thread is actually quite old, that is why it would be better to open a new thread sending us a demo project showing the problem you have met.
the Telerik team